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.