-->
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: Criteria query - Parent's property as select criteria.
PostPosted: Mon Jun 06, 2005 3:56 am 
Regular
Regular

Joined: Mon May 30, 2005 11:20 pm
Posts: 66
SUBJECT: Criteria query - Parent's property as select criteria.

Hi, I'm trying to issue a SELECT statement via Criteria query, but can't get it working...

Basically, I have two classes:

Public Class MyChildClass
...
Public Property MyParent As MyParentClass
...
End Property

Public Property ChildProp1 As Int32
...
End Property
...
End Class

Public Class MyParentClass
...
Public Property ParentProp1 As Int32
...
End Property
...
End Class


Now, ...

criteria = BIS_session.CreateCriteria(GetType(MyChildClass))
criteria.Add(Expression.EqExpression.Eq("ChildProp1 ", SomeValue))

OKAY, so far so good. BUT, what do I do to do this...:

criteria.Add(Expression.EqExpression.Eq("MyParent.ParentProp1", SomeValue))

Can you do table joins with "Criteria Queries"? I checked http://www.hibernate.org/hib_docs/reference/en/html/querycriteria.html , wasn't able to locate information I needed.

Thanks in advance.


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.