-->
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: Is there a way to exclude a property from a select statement
PostPosted: Wed Sep 28, 2005 2:33 pm 
Newbie

Joined: Tue Sep 27, 2005 6:00 pm
Posts: 4
I am using hbm2java and I have properties in my hbm files that are not mapped to columns in my database. I want hbm2java to generate the attribute along with getters and setters but I do not want hibernate to add the attribute to a select statement. I see that there are update=false and insert=false attributes but is there a select=false or something like it?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 3:12 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
Have you tried using the formula attribute? I think something like this will create a Long property in the java files, but not affect the database:

Code:
<property name="notPersisted" type="java.lang.Long" formula="0"/>

_________________
nathan


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.