NHibernate insert childs objects -
i need insert object child, child not persisted in database, how insert parent object , child in same save() method?
example:
public class parent { public virtual int id; public virtual child child; } public class child { public virtual int id; } public class test { public void insertparent() { parent p = new parent(); child c = new chield(); p.child = c; //here need insert parent , child because nobody persisted in database service.save(p); } }
Comments
Post a Comment