|
If a reference is saved as any-mapping while the type of the referenced entity is not described as meta-value within the any-mapping, hibernate saves the correct id of the referenced entity as foreign key, but leaves the type column empty (meaning it remains null). When loading the parent entity, the reference to the entity mapped with any is null. This could be easily prevented by throwing an exception in case the referenced entity type is not described within the any mapping.
|