Stefan Dimov Messages: 14 Registered: July 2009 Location: Sofia, Bulgaria
In my application I'm working with JPA entities and I need to know when exactly 'optional' attribute of OneToOne (or ManyToOne for that matter) annotation have been changed (from false to true or backward). I have to create a listener and attach it somewhere in the model, but to tell you the truth I'm a little lost here ...
You are looking for this property String : Nullable.SPECIFIED_OPTIONAL_PROPERTY. Several AttributeMappings in our model implement Nullable, so if you add a property change listener for that property to BasicMapping or SingleRelationshipMapping you will be notified when the optional setting changes.