On Wednesday 06 November 2002 15:19, Gavin King wrote:
> > Currently I have another problem with the OuterJoinGenerator:
> > The SQL created by the constructor of EntityLoader is always using ' LEFT
> > OUTER JOIN'
>
> > even if I use the OracleOuterJoinGenerator. I've added the a log
> > statement in the constructor
>
> > and it tells me that the sql 'select .... from foo left outer join bar on
> >....' was created withan OracleOuterJoinGenerator???!!!?
>
> I'm not following properly.....
>
> MultiTableEntityPersister produces some SQL with "left outer join"
> hardcoded, as you noted. Some refactoring is needed to fix this. But I'm
> pretty sure the SQL generation for outerjoin fetching never produces "LEFT
> OUTER JOIN" when the SQL dialect is set for Oracle. Surely you aren't
> seeing this when using EntityPersister?
I've added the following logging code to the constructor of EntityLoader:
log.info("Built select=" + sql + " via "
+ outerJoinGenerator.getClass().getName());
and get the following while running MultiTableTest:
....
[junit] Nov 6, 2002 3:56:24 PM cirrus.hibernate.sql.Dialect <init>
[junit] INFO: Using dialect: cirrus.hibernate.sql.OracleDialect
....
[junit] Nov 6, 2002 3:56:24 PM cirrus.hibernate.loader.OuterJoinLoader
<init>
[junit] INFO: Using JoinGenerator
cirrus.hibernate.loader.OracleOuterJoinGenerator
[junit] Nov 6, 2002 3:56:24 PM cirrus.hibernate.loader.EntityLoader <init>
[junit] INFO: Built select=SELECT rootc0.id_ AS id_, rootc01.amount as
amount10, rootc02.extraProp as extraProp8, rootc02.other2 as other29,
rootc0.count_ as count_0, rootc0.name as name1, rootc0.address as address2,
rootc0.date_ as date_3 FROM rootclass rootc0 left outer join submulti
rootc01 on rootc0.id_=rootc01.sid left outer join nuthasubclass rootc02 on
rootc0.id_=rootc02.sid WHERE rootc0.id_ = ? via
cirrus.hibernate.loader.OracleOuterJoinGenerator
[junit] Nov 6, 2002 3:56:24 PM
cirrus.hibernate.persister.MultiTableEntityPersister generateSelectString
[junit] INFO: Using select=select rootclass.id_, submulti.amount as
amount10, nuthasubclass.extraProp as extraProp8, nuthasubclass.other2 as
other29, rootclass.count_ as count_0, rootclass.name as name1,
rootclass.address as address2, rootclass.date_ as date_3 from rootclass,
submulti, nuthasubclass where rootclass.id_ = ? and
rootclass.id_=submulti.sid (+) and rootclass.id_=nuthasubclass.sid (+)
.....
Maybe the SQL-code from EntityLoader is never reached, but I have no clue,
where the sql-String from EntityLoader is comming from.
CU
--
Wolfgang Jung, Softwareentwickler
Micromata_Objects GmbH Tel: +49 561 316793-0
Marie-Calm Strasse 1, D-34131 Kassel Fax: +49 561 316793-11
mailto:[EMAIL PROTECTED] http://www.micromata.de
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel