For HQL SmallValue does not exist because it isn't a property. It is a column of a custom type but neither HQL nor Criteria nor QueryOver can access to it. Probably what you need is not a custom-type but a composite-element.
2010/4/1 jr76 <[email protected]> > I am trying to execute the following HQL query: > > from Staff x > where x.ExtendedProperties['HmriNumber'].SmallValue like ? > order by x.Name.FamilyName asc > > where ExtendedProperties is a IDictionary<string, ExPropValue> where > ExPropValue is defined as > > class ExPropValue > { > public string SmallValue { get; set; } > public string LargeValue { get; set; } > } > > and is mapped as a User-defined type. The collection mapping looks > like this: > > <map name="ExtendedProperties" lazy="true" > table="StaffExtendedProperty_"> > <key column="StaffOID_"/> > <index column="Name_" type="String"/> > <element type="ExtendedPropertyValueHbm"> > <column name="Value_" length="65000"/> > <column name="SmallValue_" length="128"/> > </element> > </map> > > It throws an exception with the error message "cannot create element > join for a collection of non-entities". Is there any reason this > should be the case? It seems to me intuitively that this query should > be fairly easily translatable to SQL. > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- Fabio Maulo -- 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.
