-->
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.  [ 1 post ] 
Author Message
 Post subject: Creating a non-mapped field in an hbm.xml mapping file?
PostPosted: Wed May 18, 2011 10:37 pm 
Newbie

Joined: Sat May 07, 2011 9:56 pm
Posts: 7
Hi,

I've been trying to find out how to add a non-persisted field to my hbm.xml mapping file. Hibernate tools are used to create the entities from the hbm.xml files. I understand that I can add a @Transient annotation in the entity object manually, but if I further make any changes in the hbm file and regenerate it, then it will override my change to the entity file.

Is there any way to add a field in the mapping file and mark it such that it is not created/persisted in the database? I need to use it as a computed field that is calculated in my java code but must not be persisted.

I've search the net and the hibernate documentation over and over but still can't find anything.

Thanks for any help.

Eric


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

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.