An entity class has many to many relationships to other entities. Lazy initialization is required for performance consideration. However, the entity needs to know if it contains other entities to set "isValid" status, i.e, it must contain at least one instance of each type of associated entities to be classified as valid.
While using lazy initializtion, how can this entity object (Contract object for example) knows if it has all other entities being added?
Does hibernate provides some sort of prechecking mechanism?
Thanks
George
|