Beginner |
|
Joined: Tue Jul 19, 2005 11:21 am Posts: 23 Location: erie, pa
|
I have:
Table A joined to table B in a many-to-many via table AB.
I have these mapped to class A and class B with both ends having a <bag> of the other, called AList and BList.
Basically, what I want to do is:
select A where B.Property = param
I am trying to do this via...
...Add(Expression.Eq("BList.Property", param))
which ends up raising the exception...
NHibernate.QueryException: could not resolve property:BList.Property of :MyApp.A []
Source File: ...NHibernate\src\NHibernate\Persister\AbstractPropertyMapping.cs Line: 45
Which I believe means its looking for "Property" on the array, when what I want is for it to match on Property on the item in the array. I think I am not understanding a concept here. The documentation and example apps I looked at didn't have an example of how I would do this. Can I do this with the Expressions or do I need to write a query? Any help?
|
|