Hi, I have the following question:
I have a class "Persona" which has a collection of objects called "Direccion".
The thing is, when I create a Person object, then add the n Direccion objets, when I want that to be saved in the data base, I get the error that it cannot insert null in the PersonId field, in the Direccion table.
That's because the Person has just been inserted.
How do I have to tell nHibernate that that Direccion objects must be inserted with the PersonId that has just inserted?
Understand what I mean?
thanks!
Hope to be clear with the explanation.
|