Hi,
we're currently considering moving our web-application's persistence layer on Hibernate. However, I did notice one bug(?) in the implementation of Criteria queries. Now I know this feature is currently experimental, but it would provide massive functionality benefits for the end users so I would gladly see it working.
The problem is that the Criteria.list() doesn't seem to call the event handlers assigned to my classes. initializeNonLazyCollections() does however do this, meaning that my parent class will not fire event handlers, but all its children do. I would like to implement permission handling through the event system and the criteria api is the only current flaw in this. Saving and updating naturally fires these handlers so no information can be changed without permission, but I would like to keep the "you're on a need-to-know basis and you don't need to know" system intact. ;)
So, any comments, fixes or workarounds for this? I would prefer to have this done inside Hibernate to keep my web tier as clean and as secure as possible.
Thanks!
|