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
|