[OJB-developers] EqualToColumnCriteria an Aliases
Brought to you by:
thma
From: Jakob B. <jbr...@ho...> - 2002-05-17 13:37:00
|
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.entryDate ,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 |