Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there a way to have "calculated field"

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I am using hibernate core.

I want that one of the fields in my class will be calculted by hql from another fields.

is there a way to do this?
 
aditee sharma
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be more specific about what you are trying to calculate.
In general,one can use the formula attribute while defining a property :

[ November 20, 2008: Message edited by: aditee sharma ]
 
joe sinnott
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, take a look at the @Transient annotation for your entity class
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic