I’m currently evaluating DBVA 3.0 and I’m facing a problem with one-to-many associations (say A 1 --> * B) (mapped as Sets)
When I try to save an instance of A I get the following exception:
Orm.PersistentException: PersistentException ---> System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
at Orm.Util.ORMInterceptor.IsUnsaved(Object entity)
at NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
at Orm.PersistentSession.SaveOrUpdate(Object obj)
at Orm.PersistentManager.SaveObject(Object obj)
The instance of A is correctly initalized (with no null reference), and its Set member too (all the code is generated by DBVA, I didn’t modify anyting).
When this simple problem will be solved I’ll try to map the association to a … Map, but I don’t see where to specify the index to use as a key in the map in DBVA.
I’m sure these are FAQs, but I didn’t find any clue about them, and saw nothing about this in the documentation.
#1 - Null Pointer Exception
Would it be possible for you to send me your project file and sample code to repeat this problem? You can reach me at jick@visual-paradigm.com. Thank you.
#2 - Map
To apply map as collection type:
Right-click on the association, and select Open Specification from popup menu.
Open the ORM Association Detail page.
Select Map from the Collection Type drop down menu.
Synchronize the class diagram to ERD, you would see an Index column is created in the Entity.
Thank you for your reply. Not silly question at all. Perhaps we should improve our usability. Thank you for your question, and thank you for recommending our products to your client!
Could you please tell me about the status of the second issue? Were you able to specify the index column in ERD? Thank you.