),
SqlEnum.CUSTOM);
This gave me the result I wanted. Not perfect, but it works.
/Ludwig
-Original Message-
From: Marc Kannegießer [mailto:mac...@gmx.org]
Sent: den 2 mars 2009 21:41
To: Apache Torque Users List
Subject: Re: Multiple addJoin with OR
Ludwig Magnusson wrote:
It does make sense. I
Hi!
I want to create an SQLQuery that combines data from three tables. Right
now, my javacode looks like this:
Criteria.addJoin(TableA.id, TableB.fk);
Criteria.addJoin(TableA.id, TableC.fk);
This results in this SQL query:
.
WHERE TableA.id = TableB.fk
AND TableA.id = TableC.fk
.
Hi Ludwig,
never done that, but I would suppose you could use criteria.getNewCriterion and
use the SqlEnum.JOIN as your comparison. Than use criteria.criterion.or to
create an or between the two.
See:
I want to create an SQLQuery that combines data from three tables. Right
now, my javacode looks like this:
Criteria.addJoin(TableA.id, TableB.fk);
Criteria.addJoin(TableA.id, TableC.fk);
This results in this SQL query:
WHERE TableA.id = TableB.fk
AND TableA.id = TableC.fk
Torque Users List
Subject: Re: Multiple addJoin with OR
Hi Ludwig,
never done that, but I would suppose you could use criteria.getNewCriterion and
use the SqlEnum.JOIN as your comparison. Than use criteria.criterion.or to
create an or between the two.
See:
http://db.apache.org/torque/releases
-Original Message-
From: Thomas Fischer [mailto:fisc...@seitenbau.net]
Sent: den 2 mars 2009 14:27
To: Apache Torque Users List
Subject: RE: Multiple addJoin with OR
I want to create an SQLQuery that combines data from three tables. Right
now, my javacode looks like
I want to create an SQLQuery that combines data from three tables.
Right
now, my javacode looks like this:
Criteria.addJoin(TableA.id, TableB.fk);
Criteria.addJoin(TableA.id, TableC.fk);
This results in this SQL query:
WHERE TableA.id = TableB.fk
AND TableA.id =
-Original Message-
From: Thomas Fischer [mailto:fisc...@seitenbau.net]
Sent: den 2 mars 2009 14:54
To: Apache Torque Users List
Subject: RE: Multiple addJoin with OR
I want to create an SQLQuery that combines data from three tables.
Right
now, my javacode looks like
: Multiple addJoin with OR
-Original Message-
From: Thomas Fischer [mailto:fisc...@seitenbau.net]
Sent: den 2 mars 2009 14:54
To: Apache Torque Users List
Subject: RE: Multiple addJoin with OR
I want to create an SQLQuery that combines data from three tables.
Right
now, my
Ludwig Magnusson wrote:
It does make sense. I rewrote the query by hand (changed AND to OR) and
executed it in the MySql console and it gave the response I wanted.
I still suspect that this is error prone. I'd be interested in the
output of explain.
The situation is kind of like this:
Table
Ludwig Magnusson wrote:
It does make sense. I rewrote the query by hand (changed AND to OR) and
executed it in the MySql console and it gave the response I wanted.
The situation is kind of like this:
Table a is a category table, it only contains ids and names of categories.
Table B is a
11 matches
Mail list logo