Hello,
we have a composite user type that represents a number with additional information. This is mapped to two columns. One column contains a plain double and the other a byte[] with some serialized info. If we create an HQL query that performs an aggregate function like "max" on a property using this composite user type an exception is thrown. The reason is that during SQL generation NHibernate transforms the property name into its two column names e.g. "max(col_double, col_serialized)". Obviously we only want to perform the max function on the double component (not the byte[]) of the composite user type.
Is there any way to specify this? I.e. is there any way of telling NHibernate which columns of a composite user type to use in an aggregate function?
Thanks in advance and best regards Patrick Baer
|