Announcement Announcement Module
Collapse
No announcement yet.
HttpInvoker with Hibernate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HttpInvoker with Hibernate

    Hi,
    i am just on a rich client project where i need call save(parentObject) with hibernate remotely through HTTPINVOKER.
    The parentObject has a one-2-many relationship to childObject. both parent and child objects have db-generated identifiers. (i.e. no id available before saving).
    the method in [HibernateDaoSupport]
    getHibernateTemplate().saveOrUpdate(parentObject) will set an id after saving on parentObject, but not in the case of HTTPINVOKER remote invoking.

    Although i can return the parameter object after saving to ensure the id has been set. but
    cascade="save-update" for childObject can not function anymore. Because when hibernate tries to save transient childobject, it can not obtain the id from parentobject.

    any advice is appreciated!
Working...
X