Re: [OJB-developers] EqualToColumnCriteria an Aliases
Brought to you by:
thma
From: Oleg N. <on...@uk...> - 2002-05-17 20:32:02
|
Hi Jakob, The SqlStatement contains code that should do this. Why it doesn't? Probably due to SqlManager intervention, similar to the case of MToNCriteria. I'll try to remove unnecessary operations in SqlManager, the column name translation should be performed only in SqlStatment and SqlGenerator. Do you agree? Regards, Oleg On Friday 17 May 2002 16:37, Jakob Braeuchi wrote: > hi oleg, > > we need a clear definition for EqualToColumnCriteria when used with > aliases. imho the table name must be replaced by the alias, but i think the > column name should stay untouched. > > ie: PERSON.FIRSTNAME -> Ax.FIRSTNAME > > the current version of SqlManager also tries to translate the column name > and if it can't find a fielddescriptor it keeps the original name. > this leads to SqlExceptions because the table has an alias and the where > statement uses the table name: > > SELECT DISTINCT > A0.id,A0.vorname,A0.name,A0.adresse,A0.gebDat,A0.test,A0.isBoss,A0.entryDat >e ,A0.idPartner FROM tabPerson A0 WHERE A0.id = tabPerson.id > > the correct form of this really useless SQL should be: > > ... FROM tabPerson A0 WHERE A0.id = A0.id > > maybe we need an EqualToFieldCriteria where both table and field name are > translated ? > > jakob > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |