association relationships : how to overwrite the foreign entity resolution

Due to a database of an ‘old fashioned’ legacy system we confronted with following issue.

Entities with regular association relationships can have ‘0’ as value in a foreign key column which means ‘null’ = no relationship.

  1. How we handle it without changing the database structure? Is it possible to overwrite the foreign entity resolution in case of reading the objects from database?

  2. And vice versa is it possible to overwrite to set the foreign key to ‘0’ in case there is no relationship for the current object?

Hi Mike,

Your question requires thorough research and we have no quick answer at the moment. Also the problem is quite unique and probably not interesting for the majority of developers.

If you are not able to find the solution yourself or with the help of the community, please email us at info@cuba-platform.com to get dedicated commercial support.