-
1. Re: Query for returning all entities that had some property
adamw Dec 19, 2008 5:30 PM (in response to fgc_fernando)Hello,
unfortunately, there is no way in a query to relate a version of an entity to its "previous" version. You can retrieve all entities where closed=true and which where modified in the current month ... if you'd have any ideas on how to implement this, please write :)
--
Adam -
2. Re: Query for returning all entities that had some property
fgc_fernando Dec 19, 2008 7:38 PM (in response to fgc_fernando)Hi, Adam,
I resolved my problem using JDBC, querying the "request_versions" table to find which requests were closed in the current month...
Thanks for your reply!! -
3. Re: Query for returning all entities that had some property
adamw Dec 20, 2008 12:27 PM (in response to fgc_fernando)Hello,
so what's your query? Do you have only the "closed" field versioned? (If yes, then you can also use an envers query)
Another solution, I was thinking about, is adding a boolean "changed" columns for selected fields in the audit/versions table; the additional column would specify if the value changed or not. This could be done by an additional annotation, for example @ChangeColumn. What do you think?
--
Adam