-->
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: Complex setter methods
PostPosted: Tue Nov 30, 2004 11:26 am 
Newbie

Joined: Fri Mar 12, 2004 10:02 am
Posts: 16
We have a domain model with complex (check) logic in the setter methods. This code should not be executed when an object is created and initialised. The requirement is that the OR mapper and the user execute different setter code. I know that Hibernate is able to access the fields directly but this is not recommend. Since it is not recommend there must be a way to do this, e.g. with a wrapper class.

Any ideas how to do that?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 30, 2004 11:36 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Accessing the fields directly is okay to solve your problem if you think it is okay for your environment. If you want to fiddle with property accessing in other creative ways, use a custom PropertyAccessor


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.