Hi,

I have two tables :

CREATE TABLE team ( id   INTEGER UNIQUE,
                    name VARCHAR(20)
                  );
CREATE TABLE match ( id  INTEGER UNIQUE,
                     home INTEGER REFERENCES team,
                     visitor INTEGER REFERENCES team
                   );

What I would like is a team java object with 4 fields : an integer id, a
string name and two collections of matches, one for the matches at home,
one outside.

But when I do :

oql = db.getOQLQuery( "SELECT team FROM ldp.data.Team team" );
results = oql.execute();

I get the following exception :

java.sql.java.sql.SQLException: ERROR:  Table name "matchs" specified
more than once while executing SELECT
"team"."id","team"."name","match".id","match"."id" LEFT OUTER JOIN
"match" ON "team"."id" = "match"."home" LEFT OUTER JOIN "match" ON
"team"."id" = "match"."visitor"

Am I misconfiguring something, or is it a bad conception of my database,
or is it not handled by Castor ??

Thanks

Franck Routier

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to