-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Updating non-dirty entities
PostPosted: Tue Apr 07, 2009 8:47 am 
Newbie

Joined: Tue Apr 07, 2009 8:38 am
Posts: 2
Location: London
Hi,
I have an entity with birthday and age properties.
The application manages the age one (the birthday is set only during persisting it the first time) that is set as @Transient (it's not on the db).

I use one method marked @PreUpdate to calculate the birthday giving the transient age field.

The problem is that is I only modify the age property the entity doesn't become dirty so the @PreUpdate method is not called.

If I modify some other property it works.

Is that the right way of doing those kind of things? How can I do to set the entity dirty from the age setter method?

Hope I was clear.

Thanks

Demetrio


Top
 Profile  
 
 Post subject: Re: Updating non-dirty entities
PostPosted: Mon May 25, 2009 12:12 pm 
Newbie

Joined: Tue Apr 07, 2009 8:38 am
Posts: 2
Location: London
anyone on this?

Thanks

Demetrio


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.