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

Hello,

is it possible to calculate a fields value using a SQL statement?
I have a progress and a status field that would have to be calculated by values from another table.


OrderEntity {
  float progress;
  int shortageLines;
}

The shortageLines field would be calculated by the number of line items from the line_items table that have been picked with a shortage. The progress field is the overal % of already picked line items versus the total number of line items to pick.

Any idea if something like that is possible to "inject" into the object using JPA?

Thanks,
Phil