Re: [appfuse-user] Updating a related entity in Struts 2 throws HibernateException

2008-05-15 Thread Dustin Pearce
I think this is a situation where you want to use a custom TypeConverter. Struts does not know how to convert your String id property into a User object. Create a custom type converter for com.yourapp.model.User (or org.appfuse.model.User) that looks up the User in the db based on String

Re: [appfuse-user] Updating a related entity in Struts 2 throws HibernateException

2008-05-15 Thread java_user_
Was a solution found? The issue is that hibernate is trying to update the lookup table (user) instead of updating the entity table's (owner) foreign key to the lookup table. What is the correct cascade to use in the ManyToOne annotation of the Owner model and the OneToMany annonation of the User

[appfuse-user] Updating a related entity in Struts 2 throws HibernateException

2008-03-08 Thread sarat.pediredla
The problem is simple, I have an object called Task which has a property called owner that is mapped as follows, @ManyToOne(cascade={CascadeType.PERSIST,CascadeType.REFRESH,CascadeType.MERGE}) @Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.an