bug #9845
openFind a solution to keep "isOrphaned" in sync (java based and hql based)
0%
Description
copied from #6220:
This is what I expected. So the critical question is here, how we can keep the java based definition of "isOrphaned" in sync with any hql based methods. Or should we simply leave a warning in the according javadoc that some hql also needs to be adapted.
Also exact tests may help for both methods.
I found this http://stackoverflow.com/questions/25382840/loading-transient-field-of-jpa-entity,
I tried to add a transient attribute isOrphaned and add a method which should be called after loading the entity (with PostLoad annotation).
But the first test did not work. But I think this could be a solution to keep it in sync.
This might be a solution but not very nice as it runs the check whenever a taxon is loaded so the performance is going down. We may think about caching this data. Once cache updating works better this might be a solution to keep it more or less in sync and also to retrieve the data directly from database which makes some queries faster (e.g. if you don't want to show orphaned taxa at all)
No data to display