-->
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: Bug since 3.2.2 when selecting many-to-one attribute
PostPosted: Tue Feb 06, 2007 6:51 am 
Newbie

Joined: Mon Feb 05, 2007 5:11 am
Posts: 3
Hello, I suspect a (major) bug here, there is wrong behaviour that occurs since version 3.2.2 and has never occurred with older versions (3.2.1, 3.1, 3.0, 2.x).

Hibernate version: 3.2.2

Mapping documents: (the mapping is only a partial example)

<class name="Segment" lazy="false">

</class>

<class name="Customer">
<id name="customerId"/>
<many-to-one name="segment" class="Segment" fetch="select"/>
</class>

When I execute HQL "select c.segment from Customer c", since 3.2.2 there is a severe problem: The generated SQL is an inner join between the tables of Customer and Segment.

This is not OK of course, since for Customers with a null segment the records are no longer returned!

All versions before 3.2.2 used to generate a select only on the Customer table, and then fetch the segement immediately afterwards through separate select(s). What is weird is that a "from Customer c" does not generate the inner join but still shows correct behaviour (i.e. the Segment for each retrieved customer is read afterwards with separate select statements).


The bug is the same as described in http://opensource.atlassian.com/project ... e/HHH-2402


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.