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: HQL, order by and null values
PostPosted: Wed Nov 28, 2007 3:23 am 
Newbie

Joined: Tue Aug 14, 2007 2:19 am
Posts: 1
Hi,

I have stumbled upon a problem when setting up an objectdatasource with nhibernate with server-side sorting. I have a gridview which lists orders, and one of the columns displays the name of a customer if one is registered and if not it displays a text similar to "Private". In my gridview, this column have the sortexpression "o.Customer.Name".

The problem arises on orders which are not connected to any customers (this is a requirement on the application, we only track valid business customers, private customers are not registered), and the Customer property is null. When ordering on this property, these are not returned.

Does anyone have a suggestion how to solve this? Considering that the sorting are done on the server-side, I guess there are some SQL magic needed...


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.