-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to perform a Join using Criteria API
PostPosted: Mon May 14, 2007 4:12 am 
Newbie

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.