Entity type mix in browser

Hi,

We have a browser screen with 2 types of entities mixed in one datagrid. We use KeyValueCollection to handle this and we experiment a lot of issues/difficulties with it:

  • trying to use a request to exploit CUBA filter
  • trying to complete records with additional properties and handle them cleanly in data grid

In general, CUBA throws us an exception from elsewhere in the framework for a not so obvious reason which requires a lot of time to understand.

Please tell me if it is the CUBA way to handle this ? What we don’t have understanded with KeyValueEntity mechanism ?

Best regards, Stef.

PS: Please do KeyValueEntity a first class citizen in your documentation. There is a lot to be said about the limitations / constraints of using KeyValueEntity in terms of screen lifecycle, definition in XML and handling of this type of entity in datagrid, etc. Lots of hopes and lots of disappointments.

Hi,

Are those two entities complete different entities, or do they share some common ground? If not, how do you deal with the columns then?

Oftentimes entity inheritance helps solving such requirements (without knowing your specific case): you can read about it here:

https://www.cuba-platform.com/guides/data-modelling-entity-inheritance

Bye
Mario

Thank you for your response (and I apologize for the response time).

These entities are in relation via association (ORM) so inheritance isn’t a solution.