Well, as I said - I'm quite new here, so I may be discovering things, that are 
obvious for the experienced ones of you :)
 
Thanks Roger for your explanation. I know that having the two-way inverse 
association would workaround the issue, but there are still situations where 
it's not welcome to introduce the child-to-parent association in the code.
 
Now that I know how NH works this out, I'm thinking if it would be appropriate 
(feasable) to introduce a patch that would change its behavior to merge the 
insert pet with update pet.
 
Fabio/Dario?


>>> [email protected] 2009-05-12 10:06:06 >>>

I*ve been wondering this as well in the past. Now I*ve just accepted it. That*s 
simply how nh works. Remember that the association between parent-child is 
considered to be *own*/handled by the parent. In your case, I think something 
like this is happening when creating the sql*1.       Insert the parent2.       
Insert the child. The association to the parent, this child doesn*t know 
anything about. In other words * it can*t produce sql for it.3.       *Back* to 
the parent again to fix the association * update occurs If you use *inverse* on 
the parent*s one-to-many, you say that this one is not responsible for the 
association -> the child is - > you will gain an update (and can set 
not-null=true if you want to). /Roger



CONFIDENTIALITY NOTICE
This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged, confidential or otherwise legally exempt from disclosure. If you 
are not the named addressee, you are not authorized to read, print, retain, 
copy or disseminate this message or any part of it. If you have received this 
message in error, please delete all copies of this message and notify the 
sender immediately by return mail or fax ATSI S.A.(+4812) 285 36 04.
Any email attachment may contain software viruses which could damage your own 
computer system. Whilst reasonable precaution has been taken to minimise this 
risk, we cannot accept liability for any damage which you sustain as a result 
of software viruses. You should therefore carry out your own virus checks 
before opening any attachments.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to