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.
-
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?
-
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?