I would like to map a many to one relationship between two tables, but the keys on the "many" side don't have a foreign key constraint, because the records on the "many" side can exist in the domain without a corresponding "one" record.
When I pull back an entity where the "one" side is populated, my many-to-one relationship works fine. When the "one" side is null, I get an ObjectNotFoundException.
Is there any way to map the relationship such that the getter will simply return null rather than throwing an exception?
|