-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Aggregate function on composite user type
PostPosted: Wed Aug 11, 2010 9:12 am 
Newbie

Joined: Wed Aug 11, 2010 9:03 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.