postgresql - hibernate enverse : how to get changed value in relation field -


i using hibernate enverse 5.2.10.final postgres data base.

auditreader auditreader = auditreaderfactory.get(entitymanager);         string newvalue = (string) auditreader.createquery()                 .forentitiesatrevision(vehicle.class, 2203869)                 .traverserelation("vehicletype", jointype.inner).addprojection(auditentity.property("id")).up()                 .add(auditentity.property("vehicletype").haschanged())                               .add(auditentity.id().eq(2203422l))                 .add(auditentity.revisionnumber().eq(2203869)).getsingleresult(); 

vehicle table has many-to-one relationship vehicletype. how changes of vehicle type property of vehicle entity using enverse query. here no result found error. cannot get value audientity.property("vehicletype")..haschanged() their's error property not found.

auditreader.createquery()   .forentitiesatrevision( vehicle.class, revisionnumber )                                              .traverserelation( propertyname, jointype.left )   .addprojection( auditentity.property("id") ).up()   .add( auditentity.property( propertyname ).haschanged() )   .add( auditentity.id().eq( vehicleid ) )                                     .getsingleresult() 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -