[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: Calculations of field values using other tables

James wrote:
You could change this to a query instead of a persistence attribute.

What you mean by that? How would I annotate that or create this query?


If you need to map it, you could use a TransformationMapping in EclipseLink, or use a postBuild event to query the data. You could also just lazy initialize the field using a query.


Another solution would be define a database view that include the computed values and map your object to the view.
I am doing that right now, it might be the most performant solution.
But anyway I am interested, in case the DB does not support views, how I would use a TransformationMapping in my particular case. Do you have an example of that for me?


Thanks,
Phil