Is the first item of 'Advanced Problems' on http://www.hibernate.org/117.html still true or do recent versions of NHibernate support querying collections though the Criteria API?
I have a simple situation like this:
Class Person
{
IList EmailAddresses {get; set;}
}
The Email addresses are mapped as simple strings like this:
<class name="Person"/>
<list name="EmailAddresses" table="PersonEmailAddresses" lazy=" >
<key column="PersonID"/>
<index column="DisplayOrder"/>
<element column="EmailAddress" type="string"/>
</list>
</class>
In HQL I can do a query on the email Addresses like this:
Session.CreateQuery("from Person p join p.EmailAddresses e where e =
'[EMAIL PROTECTED]'").List()
Is there an equivalent using the Criteira API? I've tried a number of
things but they all break in some shape or form.
Thanks
Jon
Jon Palmer
Senior Software Engineer, Contact Networks
35 Thomson Place T3 | Boston, MA 02210
O: 617.856.1836 | M: 415.269.1862
Contact Networks, a Thomson Reuters company, is the global leader of B2B
social networking for professionals.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---
<<inline: image001.gif>>
