Re: [OJB-developers] Re:
Brought to you by:
thma
From: Jakob B. <jbr...@ho...> - 2002-05-15 15:38:14
|
hi oleg, yes the changed order of joins solves the problem in mysql. jakob ----- Original Message ----- From: "Oleg Nitz" <on...@uk...> To: <obj...@li...> Sent: Wednesday, May 15, 2002 9:42 AM Subject: [OJB-developers] Re: > Hi Jakob, > > Is you version of MySQL okay with the query > > SELECT DISTINCT A0.id,A0.idPerson,A0.nummer,A0.saldo FROM > (tabPerson A1 INNER JOIN tabTelefon A2 ON A1.id=A2.idPerson) > INNER JOIN tabKonto A0 ON A0.idPerson=A1.id > WHERE A2.tel_nr LIKE ? > > I can change the order of joins, no problem. > > The alternative SQL92 syntax is used in HSQL, you could try it with MySQL, > just append > > public byte getJoinSyntaxType() > { > return HSQL_JOIN_SYNTAX; > } > > to PlatformMySQLImpl.java > > Regards, > Oleg > > On Wednesday 15 May 2002 08:59, Jakob Braeuchi wrote: > > hi oleg, > > > > i have a problem with the new SqlStatement: > > > > [ojb.broker.accesslayer.SqlGenerator] DEBUG: SQL: SELECT DISTINCT > > A0.id,A0.idPerson,A0.nummer,A0.saldo FROM tabKonto A0 INNER JOIN (tabPerson > > A1 INNER JOIN tabTelefon A2 ON A1.id=A2.idPerson) ON A0.idPerson=A1.id > > WHERE A2.tel_nr LIKE ? > > > > this produces a syntax error in mysql : syntax error near (tabPerson A1 > > INNER JOIN.... > > > > the query i execute is the following: > > > > Query query; > > Criteria crit; > > crit = new Criteria(); > > crit.addEqualTo("inhaber.telefone.nummer", "031%"); > > query = new QueryByCriteria(Konto.class, crit, true); > > showResult(broker.getCollectionByQuery(query)); > > > > 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 > |