java - How can I run a secondary / augmented query in Spring Data JPA to determine calculated value? -


i using spring data 1.4.1 eclipselink 1.5.0.

i have entity such:

@entity public class {     // ... other fields ...      @transient     private boolean calculatedfield;     } 

i ideally want populate calculated field on post load. value logically rather complicated query. in hibernate, can annotate field @formula. aware eclipselink not provide similar functionality. bound eclipselink.

i wondering if spring data jpa provides mechanisms processing entity information create , run "additional" queries, if will. or augment original query?

my first thought implement repository , set field in secondary query. i'd rather avoid concrete implementations of repository if could.

suggestions?

i ended implementing descriptorcustomizer. prefer orm agnostic solution. time being, solved issue.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -