Mail Archive Home | medor List | Febuary 2005 Index
| <-- Date Index --> | <-- Thread Index --> |
Bugs item #300616, was opened at 19/07/2004 10:07
You can respond by visiting:
http://forge.objectweb.org/tracker/?func=detail&atid=100043&aid=300616&group_id=43
Category: MEDOR core
Group: bug
>Status: Closed
Resolution: Fixed
Priority: 9
Submitted By: Helene Joanin (joaninh)
Assigned to: Alexandre Lefebvre (lefebval)
Summary: NULL values not correctly taken into account when join is done
Initial Comment:
This bug was found when validating JOnAS.
The EJBQL:
SELECT a.creditCompany.name FROM jt2_Address AS a
is badly generated:
SELECT JT2_CCOMPANY__3_creditCompany.name_ FROM JT2_ADDRESS_ JT2_ADDRESS__1
left outer join JT2_CCOMPANY_ JT2_CCOMPANY__3_creditCompany
on JT2_ADDRESS__1.id_ = JT2_CCOMPANY__3_creditCompany.jt2_Address_id_
Indeed, the a.creditCompany with NULL values are not excluded.
See the JOnAS bug #300538
and the JOnAS conformance test
junit entity F_EjbqlEC2 testAddrGetAllCreditCompanyNames
----------------------------------------------------------------------
Comment By: Helene Joanin (joaninh)
Date: 08/12/2004 14:43
Message:
Logged In: YES
user_id=229
This bug is re-open because a JOnAS user (E.Rias) had a
regression due to the fix of this bug. 'join' instead of
'left outer join' is generated.
The problem is reproduced by the JOnAS conformance test
junit entity F_TierEC2
The EJBQL query is:
SELECT OBJECT (tier) FROM JT2_Tier AS tier
WHERE tier.tiephy.nomusatie LIKE ?1
OR tier.tiemor.raisoctie LIKE ?1
The generated SQL query is:
SELECT JT2_TIERS_0.NUMINTTIE FROM JT2_TIERS as JT2_TIERS_0
join JT2_TIEPHY as JT2_TIEPHY_1_tiephy on
JT2_TIERS_0.NUMINTTIE = JT2_TIEPHY_1_tiephy.NUMINTTIE join
JT2_TIEMOR as JT2_TIEMOR_2_tiemor on JT2_TIERS_0.NUMINTTIE =
JT2_TIEMOR_2_tiemor.NUMINTTIE WHERE
((JT2_TIEPHY_1_tiephy.NOMUSATIE LIKE ?1) OR
(JT2_TIEMOR_2_tiemor.RAISOCTIE LIKE '?1))
----------------------------------------------------------------------
Comment By: Alexandre Lefebvre (lefebval)
Date: 19/11/2004 12:12
Message:
Logged In: YES
user_id=105
Applied Rafael Schloming patches for JORM (adapter) and MEDOR.
Tested on MEDOR and JORM tests.
Tested on JOnAS.
Explanations by Rafael:
I've attached a fix for bug #300616. The patch is split into
two files.
The first patch must be applied to jorm. This modifies
JoinedTable.Join
to store a flag indicating whether to use an inner or outer
join. This
patch also modifies BasicRdbAdapter to pay attention to that
flag.
The second patch is for medor itself. This patch modifies
the QueryNode
interface to carry a flag for each child indicating whether
that child
should be inner or outer joined. FlattenQueryTreeRule and
JormFlatten2Rdb are modified to propogate the flag and pay
attention to
the flag as appropriate. And finally NavigatorNodeFactory tells
JoinProject to use inner joins when the passed in operation is
NAVIGATION.
I've tested this fix against the jonas EJB-QL suite and it
doesn't
appear to cause any regressions, and does in fact fix the
test case
cited in bug #300616.
----------------------------------------------------------------------
You can respond by visiting:
http://forge.objectweb.org/tracker/?func=detail&atid=100043&aid=300616&group_id=43
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.