Also, not understanding the problem myself, you might want to check that the entites have a useful implementation of equals/hashcode. This sort of thing has bit me more times than I care to remember.. If u test the objects with an equals/hashcode impl based solely on the nullable primary key of the entities, do things change or do better?
Peace, Josh On 8/19/06, Detlef Schulze <[EMAIL PROTECTED]> wrote:
I don't fully understand, but it sounds a bit like you have a property on your page which should be marked as persistent but isn't. Could you post some code (java, page, html)? Cheers, Detlef -----Original Message----- From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Sent: Samstag, 19. August 2006 16:21 To: Tapestry users Subject: Tapestry with Hibernate vs JSF with Hibernate (Object binding question) Hello there! As I said on previous emails, I'm migrating a JSF app to tapestry, I'm about to finish. One thing that is really tricking me is the way that the Hibernate entities are bound on both frameworks (I might being doing something wrong here). My edit page has an object (Event) that has a many-to-one relationship to User, so on the same screen I add/edit an user and an event. Well on the JSF, when I hit the service layer (both apps share the same model desing, with same entities and spring transaction managed classes) the Event has an user (that is a EnhancedByCGLIB user) with all it's original values (even those that are not displayed to the user on the screen), so calling: eventDAO.update(event), updates my user as well. On Tapestry side, hitting the service layer, the Event has a User (POJO) and all other values have just gone, it seems that tapestry, when binding it's values it does something like this: User user = new User(); ... //set properties present on the screen, dump all other from database event.setUser(user); This not only mess my database, but also makes hibernate to create a new user for my event, instead of updating an existing one. Well, I'm pretty sure I'm doing stupid things here, could anyone help me out? Best Regards Vinicius --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]