-->
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.  [ 4 posts ] 
Author Message
 Post subject: exclude properties from dynamic insert or update
PostPosted: Mon Oct 01, 2007 1:25 pm 
Newbie

Joined: Fri Sep 28, 2007 5:51 am
Posts: 8
Hi. Is it possible to define dynamic-update or insert for an entity, but excluding some properties? (such as a "last update" property which I want always considered dirty, and so included in sql statement, even if has not been changed)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 01, 2007 6:33 pm 
Regular
Regular

Joined: Sun Sep 30, 2007 7:51 pm
Posts: 93
Hi! Why would you need this? JPA is here to layer out the persistence of your objects. Why would you want to dictate it some rules how it should do the updates, inserts etc?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 02, 2007 5:20 am 
Newbie

Joined: Fri Sep 28, 2007 5:51 am
Posts: 8
This is a case:

- I want to define my user type for last_update_date, a property defined in almost all entities. I don't want a setter for the relative property.
The field is always not "dirty" so, if I want to involve my type, I have to declare my entity without dynamic update. And for me this is an important limitation.

I would like to define dynamic-update, but always have the last_update_date property included in UPDATE statements.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 27, 2007 10:24 am 
Newbie

Joined: Fri Sep 28, 2007 5:51 am
Posts: 8
Any idea?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.