-->
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.  [ 2 posts ] 
Author Message
 Post subject: Criteria Help
PostPosted: Wed Oct 10, 2007 2:58 pm 
Beginner
Beginner

Joined: Fri May 13, 2005 11:48 am
Posts: 32
Hibernate version:1.2
SQL Server 2005


Object Graph: (Pseudo Code)
ApplicationAccess
.Application.Id = $appId
.UserAccesses.User = $user


Code:
Dim crit As ICriteria = sess.CreateCriteria(GetType(ApplicationAccess))
crit.Add(Expression.Eq("Application.Id", applicationId))
crit.CreateCriteria("UserAccess").Add(Expression.Eq("User", user))


Desired Result:
Return all ApplicationAccess objects that have an AppId = ?
and the user is in the useraccess collection.

Any and all help appreciated.
-d


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 10, 2007 3:35 pm 
Beginner
Beginner

Joined: Fri May 13, 2005 11:48 am
Posts: 32
This doesn't error but I am not sure its doing what I want or not either.


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

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.