db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leandro Rodrigo Saad Cruz <lean...@ibnetwork.com.br>
Subject Re: Aliases on MtoN queries not working anymore
Date Wed, 21 Jan 2004 20:24:04 GMT
Ok.. thanks Jakob

On Wed, 2004-01-21 at 12:40, "Jakob Bräuchi" wrote:
> hi leandro,
> 
> the mn-prefetcher is quite new. and it never supported aliases ;)
> i´m at the oop2004 in munich right now; so i´ll have a look at the problem
> as soon as i´m at home again.
> 
> jakob
> 
> 
> > Hi all. I'm having some problems with mton queries because ojb is not
> > creating a sql query using aliases anymore.
> > 
> > Maybe the problem is in
> > MtoNCollectionPrefetcher.buildMtoNImplementorQuery()
> > 
> > Do you know if the alias generation was accidentally removed ?
> > 
> > Example query(wrong) : SELECT DISTINCT PROJETO_ID,SERVICO_ID FROM
> > SERVICO A0,SERVICO_PROJETO WHERE (SERVICO_PROJETO.PROJETO_ID IN ( '12' ,
> > '2' , '13' )) AND A0.SERVICO_ID = SERVICO_PROJETO.SERVICO_ID
> > 
> > Causes my database to yeild with :
> > org.apache.ojb.broker.PersistenceBrokerSQLException:
> > java.sql.SQLException: ERROR:  Column reference "servico_id" is
> > ambiguous
> > 
> > Because servico_id is present on both tables, servico and
> > servico_projeto
> > 
> > -- 
> > Leandro Rodrigo Saad Cruz
> > IT - Inter Business Tecnologia e Servicos (IB)
> > http://www.ibnetwork.com.br
> > http://db.apache.org/ojb
> > http://xingu.sourceforge.net
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-dev-help@db.apache.org
> > 
-- 
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br
http://db.apache.org/ojb
http://xingu.sourceforge.net



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message