Joined: Fri Sep 15, 2006 6:07 am Posts: 5
|
Hi
I’m trying to extend criteria query in a generic manner (permission filtering).
So I’ve created a class and mapped it to a DB view (that includes all the permitted entities). However there is no association between the classes in the hibernate mapping file.
I want to extend all hibernate criteria query before it’s being executed with my permission criteria, but I fail to define the permission class with createCriteria after createCriteria was already defined for the specific queried class.
public Class Example
{
private String id;
private Entity entity;
}
public Class Permitted
{
private String userId;
private Entity permittedEntity;
}
do some kind of join between
Example.entity = Permitted.permittedEntity
Note that I want to use a join instead of finding the permitted entities list and using “Expression.in” for performance reasons.
|
|