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

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -