To make it a bit more illustrative:
I have the following set-up
Code:
Account
|__User
|__Report
|__LogEntry
So everything is somehow related to Account, LogEntry has a Report property and Report has an Account property. So in case of the LogEntry, there is a transitive relation via Report.
For convenience, I would like to have direct access to Account from LogEntry and to use it in a hibernate filter condition for access control.
Usually, access to Account from LogEntry could be done via customized getters in LogEntry, e.g. getAccount() and a transient Account property. However, Hibernate filters (using the Account property) cannot be used in this setting, because they are defined using SQL which needs to address the account column which is not there in case of transient property.
So my hope is that it can be remedied by derived properties as I described in the former post.
Is this a hopeless approach in the end?
Thanks
fatzopilot