Problem with one-to-many association


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.

Thanks in advance for any help,


Hi Jean-Marie,

Thank you for your post.

#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 Thank you.

#2 - Map
To apply map as collection type:

  1. Right-click on the association, and select Open Specification from popup menu.
  2. Open the ORM Association Detail page.
  3. 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.


Article - Using Mouse Gesture to Synchronize Class Diagrams and Entity Relationship Diagrams

Best Regards,

Hi Jick,

Thank you for your reply:

#1 - Null Pointer Exception : SOLVED
I simply forgot to include one mapping file into the .Net assembly :frowning:

Sorry for this silly question… but I just recommended your products to my client, which will buy it :slight_smile:

Best regards,


Hi Jean-Marie,

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! :slight_smile:

Could you please tell me about the status of the second issue? Were you able to specify the index column in ERD? Thank you.

Best Regards,