Re: [OJB-developers] EqualToColumnCriteria an Aliases
Brought to you by:
thma
From: Jakob B. <jbr...@ho...> - 2002-05-18 07:04:15
|
hi oleg, > the column name translation should be performed only in SqlStatment and > SqlGenerator. Do you agree? definitely yes. EqualToColumnCriteria is a special case because it explicetely uses the column name (_not_ the field name) on the right side of =. this column name should imho not be translated. i'm not shure about the left side of =. if EqualToColumnCriteria is only used in MtoNCriteria we could leave the column names on both sides untranslated. what we definitely need to translate is an optional table name (ie. T_PERSON.FNAME ) here T_PERSON should be replaced by the alias leading to A0.FNAME. what do you think ? greetings from switzerland jakob ----- Original Message ----- From: "Oleg Nitz" <on...@uk...> To: <obj...@li...> Sent: Friday, May 17, 2002 10:37 PM Subject: Re: [OJB-developers] EqualToColumnCriteria an Aliases > 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 > > _______________________________________________________________ > > Hundreds of nodes, one monster rendering program. > Now that▓s a super model! Visit http://clustering.foundries.sf.net/ > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |