NHibernate.QueryException: could not resolve property:Album of :MyApp.Domain.Order.OrderItem [from MyApp.Domain.Order.OrderItem as orderItem join orderItem.Product as track join track.Album as album where album.Artist.ID = ? and orderItem.Product.class = 5]
I can't figure out what the problem here is. Is it perhaps it's trying to join on classes which aren't 5? Here's my query and my mappings:
from OrderItem as orderItem
join orderItem.Product as track
join track.Album as album
where album.Artist.ID = 212 and orderItem.Product.class = 5
In the OrderItem class I have:
<any name="Product"
meta-type="Int32"
id-type="Int32">
<meta-value class="MyApp.Domain.Track, MyApp.Domain" value="5"/>
<meta-value class="MyApp.Domain.Ringtone, MyApp.Domain" value="6"/>
<column name="item_type"/>
<column name="item_id"/>
</any>
Here's the track mapping:
<class name="MyApp.Domain.Track, MyApp.Domain" table="Track">
<id name="_ID" column="Track_id" access="field" type="Int32" unsaved-value="-1">
<generator class="native"/>
</id>
<many-to-one
name="Album"
column="Album_id"
not-null="true"/>
</class>
|