Hi,
I have a one-to-many association between Person and Pictures.
I am mapping Pictures with a < list > that saves the position of the
Pictures. The Position column has a "not null" constraint.
Pictures Table looks like:
PK_PicId NOT NULL
FK_PersonId NOT NULL
Position NOT NULL
Path
I want NHibernate to generate a one shot INSERT SQL statement like:
INSERT INTO Pictures(FK_PersionID, Position, Path)
VALUES(1,1,"~/Foobar.jpg");
I've tried:
inverse="false" on the relationship from the parent side cause NHibernate to
generate:
INSERT INTO Pictures (Path) VALUES ("~/Foobar.jpg")
inverse="true" on the relationship from the parent side causes NHibernate to
generate:
INSERT INTO Pictures(FK_PersonID, Path) VALUES(1, "~/Foobar.jpg")
Notice that the Position column is missing from the statement.
I noticed that inverse='false' is a Hibernate 3 feature:
http://www.hibernate.org/193.html
Is this still the case with the latest NHibernate 2.0.1?
Thanks,
Brian
----------------------------------------------
Brian Chavez
Bit Armory, Inc.
<http://www.bitarmory.com> http://www.bitarmory.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---