Automaticall set parent properties on cascading saves
-----------------------------------------------------
Key: NH-811
URL: http://jira.nhibernate.org/browse/NH-811
Project: NHibernate
Type: New Feature
Versions: 1.2.0.Beta2
Reporter: Tobias Grimm
Priority: Trivial
It would be nice, if during a cascading save the parent properties of the list items automatically get set to their parent:
// Assuming e.g. a one-to-many mapping with cascading save
class Parent
{
...
public IList<Child> Childs
{
get { return _childs; }
set { _childs = value; }
}
}
class Child
{
...
public Parent Parent
{
get { return _parent; }
set { _parent = value; }
}
}
Parent parent = new Parent();
Child child = new Child();
// child.Parent should be automatically set by NHibernate,
// just like parent.Id and child.Id are set as well
session.Save(parent);
Assert.AreEqual(parent, child.Parent);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|