-->
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.  [ 2 posts ] 
Author Message
 Post subject: select single columns including null values
PostPosted: Mon Jul 19, 2004 9:08 am 
Newbie

Joined: Mon Jul 19, 2004 8:53 am
Posts: 1
Hi,
with HQL I try to select single columns of a Class like

select line.id, line.name, line.description from a.b.c.Line line where ...

This usually works fine, also when selecting colums from many-to-one-relations, etc.
Now I have a problem with nullable columns:
I have 2 classes "Service" and "Provider" and have a many-to-one-relation in Service pointing to Provider (field "provider") with Provider als nullable property.
The HQL select statement

select srv.id, srv.name, srv.provider.name from a.b.c.Service srv where ...

only returns entries where provider is not null. Selecting prv.service returns the same result, selectig the entries without the column from service returns the right result set.
In my hibernate configuration use_outer_join is set to true.

Any ideas why this works fine with other "simple" nullable columns and with non-nullable references but not with nullable references?

Any help would be appreciated,
Wolfgang


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 19, 2004 9:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
look at the generated SQL and you will understand ... then look at the HQL join syntax.


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

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.