I have learned that a unidirectional one-to-many association can cause
a foreign-key constrain violation on an insert or update operation.
>From Sec. 6.4 of the NHibernate documentation (Ver. 2.1):

"Very Important Note: If the <key> column of a <one-to-many>
association is declared NOT NULL, NHibernate may cause constraint
violations when it creates or updates the association. To prevent this
problem, you must use a bidirectional association with the many valued
end (the set or bag) marked as inverse="true"."

Here's my question: In light of the above, is it possible to have a
unidirectional (parent-to-child) one-to-many association, assuming a
foreign-key constraint in the database? Or must all one-to-many
associations be bidirectional, if the database has a foreign-key
constraint? Thanks.

David Veeneman
Foresight Systems
--~--~---------~--~----~------------~-------~--~----~
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