You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by sbelt <sb...@zeroton.com> on 2002/01/02 19:39:01 UTC

Torque Outside Turbine - bug?

I am using Torque outside of Turbine. I am using a CVS-version from Dec.
26th on Linux. I am also using Postgresql as my database.  I created my own
schema.xml which creates 6 tables and several Foreign Keys among them. In
getting this running, I found 2 issues:

1) The .sql created by ant adds commas to the end of the last column which
causes the .sql to fail. For example, torque generated:

    drop table table1;
    CREATE TABLE table1
    (
        x1 serial,
        x2 varchar (256),
        PRIMARY KEY(x1), <-- this is the troublesome comma
    );

Postgres does not like the comma after the PRIMARY KEY definition when I run
this .sql using psql. I got around this by editing the .sql to remove these
extra commas. Now the .sql works.

2) The comments at the end of the generated .sql incorrectly label the
foreign key defintions. The keys generated for table-3 are labeled as "--
table-2". The SQL commands are actually correct (so you do not need to
modify the .sql if you don't want), it is just the commented labels which
are incorrect.

I hope this helps someone if they are having similar difficulties.

Steve B.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Torque Outside Turbine - bug?

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"sbelt" <sb...@velos.com> writes:

> Thanks! I got the latest templates from CVS and this did the trick!

That's great, Steve!

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Torque Outside Turbine - bug?

Posted by sbelt <sb...@velos.com>.
Thanks! I got the latest templates from CVS and this did the trick!

----- Original Message -----
From: "Daniel Rall" <dl...@finemaltcoding.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, January 02, 2002 3:00 PM
Subject: Re: Torque Outside Turbine - bug?


> I wouldn't expect any reasonably current Velocity JAR to have anything
> to do with these problems.  More than likely, your Torque templates
> are not in sync with your code.
>
> "sbelt" <sb...@velos.com> writes:
>
> > I just tried the latest cvs from jakarta-velocity. I get the same
behavior.
> >
> > Steve B.
> >
> > ----- Original Message -----
> > From: "Martin Poeschl" <mp...@marmot.at>
> > To: "Turbine Users List" <tu...@jakarta.apache.org>
> > Sent: Wednesday, January 02, 2002 10:59 AM
> > Subject: Re: Torque Outside Turbine - bug?
> >
> >
> >> sbelt wrote:
> >>
> >> > I am using Torque outside of Turbine. I am using a CVS-version from
Dec.
> >> > 26th on Linux. I am also using Postgresql as my database.  I created
my
> > own
> > > > schema.xml which creates 6 tables and several Foreign Keys among
them.
> > In
> > > > getting this running, I found 2 issues:
> >> >
> >> > 1) The .sql created by ant adds commas to the end of the last column
> > which
> > > > causes the .sql to fail. For example, torque generated:
> >> >
> >> >     drop table table1;
> >> >     CREATE TABLE table1
> >> >     (
> >> >         x1 serial,
> >> >         x2 varchar (256),
> >> >         PRIMARY KEY(x1), <-- this is the troublesome comma
> >> >     );
> >> >
> >> > Postgres does not like the comma after the PRIMARY KEY definition
when I
> > run
> > > > this .sql using psql. I got around this by editing the .sql to
remove
> > these
> > > > extra commas. Now the .sql works.
> >>
> >>
> >> i'm generating sql with torque multiple times a day for different rdbms
..
> > and it works fine for me
> > > ... which version ov velocity are you using?? try to update your
> > velocity.jar
> > >
> >>
> >> >
> >> > 2) The comments at the end of the generated .sql incorrectly label
the
> >> > foreign key defintions. The keys generated for table-3 are labeled as
> > "--
> > > > table-2". The SQL commands are actually correct (so you do not need
to
> >> > modify the .sql if you don't want), it is just the commented labels
> > which
> > > > are incorrect.
> >>
> >>
> >> i'll take a look at this
> >>
> >> martin
> >>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Torque Outside Turbine - bug?

Posted by Daniel Rall <dl...@finemaltcoding.com>.
I wouldn't expect any reasonably current Velocity JAR to have anything
to do with these problems.  More than likely, your Torque templates
are not in sync with your code.

"sbelt" <sb...@velos.com> writes:

> I just tried the latest cvs from jakarta-velocity. I get the same behavior.
>
> Steve B.
>
> ----- Original Message -----
> From: "Martin Poeschl" <mp...@marmot.at>
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> Sent: Wednesday, January 02, 2002 10:59 AM
> Subject: Re: Torque Outside Turbine - bug?
>
>
>> sbelt wrote:
>>
>> > I am using Torque outside of Turbine. I am using a CVS-version from Dec.
>> > 26th on Linux. I am also using Postgresql as my database.  I created my
> own
> > > schema.xml which creates 6 tables and several Foreign Keys among them.
> In
> > > getting this running, I found 2 issues:
>> >
>> > 1) The .sql created by ant adds commas to the end of the last column
> which
> > > causes the .sql to fail. For example, torque generated:
>> >
>> >     drop table table1;
>> >     CREATE TABLE table1
>> >     (
>> >         x1 serial,
>> >         x2 varchar (256),
>> >         PRIMARY KEY(x1), <-- this is the troublesome comma
>> >     );
>> >
>> > Postgres does not like the comma after the PRIMARY KEY definition when I
> run
> > > this .sql using psql. I got around this by editing the .sql to remove
> these
> > > extra commas. Now the .sql works.
>>
>>
>> i'm generating sql with torque multiple times a day for different rdbms ..
> and it works fine for me
> > ... which version ov velocity are you using?? try to update your
> velocity.jar
> >
>>
>> >
>> > 2) The comments at the end of the generated .sql incorrectly label the
>> > foreign key defintions. The keys generated for table-3 are labeled as
> "--
> > > table-2". The SQL commands are actually correct (so you do not need to
>> > modify the .sql if you don't want), it is just the commented labels
> which
> > > are incorrect.
>>
>>
>> i'll take a look at this
>>
>> martin
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Torque Outside Turbine - bug?

Posted by sbelt <sb...@velos.com>.
I just tried the latest cvs from jakarta-velocity. I get the same behavior.

Steve B.

----- Original Message -----
From: "Martin Poeschl" <mp...@marmot.at>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, January 02, 2002 10:59 AM
Subject: Re: Torque Outside Turbine - bug?


> sbelt wrote:
>
> > I am using Torque outside of Turbine. I am using a CVS-version from Dec.
> > 26th on Linux. I am also using Postgresql as my database.  I created my
own
> > schema.xml which creates 6 tables and several Foreign Keys among them.
In
> > getting this running, I found 2 issues:
> >
> > 1) The .sql created by ant adds commas to the end of the last column
which
> > causes the .sql to fail. For example, torque generated:
> >
> >     drop table table1;
> >     CREATE TABLE table1
> >     (
> >         x1 serial,
> >         x2 varchar (256),
> >         PRIMARY KEY(x1), <-- this is the troublesome comma
> >     );
> >
> > Postgres does not like the comma after the PRIMARY KEY definition when I
run
> > this .sql using psql. I got around this by editing the .sql to remove
these
> > extra commas. Now the .sql works.
>
>
> i'm generating sql with torque multiple times a day for different rdbms ..
and it works fine for me
> ... which version ov velocity are you using?? try to update your
velocity.jar
>
>
> >
> > 2) The comments at the end of the generated .sql incorrectly label the
> > foreign key defintions. The keys generated for table-3 are labeled as
"--
> > table-2". The SQL commands are actually correct (so you do not need to
> > modify the .sql if you don't want), it is just the commented labels
which
> > are incorrect.
>
>
> i'll take a look at this
>
> martin
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Torque Outside Turbine - bug?

Posted by Martin Poeschl <mp...@marmot.at>.
sbelt wrote:

> I am using Torque outside of Turbine. I am using a CVS-version from Dec.
> 26th on Linux. I am also using Postgresql as my database.  I created my own
> schema.xml which creates 6 tables and several Foreign Keys among them. In
> getting this running, I found 2 issues:
> 
> 1) The .sql created by ant adds commas to the end of the last column which
> causes the .sql to fail. For example, torque generated:
> 
>     drop table table1;
>     CREATE TABLE table1
>     (
>         x1 serial,
>         x2 varchar (256),
>         PRIMARY KEY(x1), <-- this is the troublesome comma
>     );
> 
> Postgres does not like the comma after the PRIMARY KEY definition when I run
> this .sql using psql. I got around this by editing the .sql to remove these
> extra commas. Now the .sql works.


i'm generating sql with torque multiple times a day for different rdbms .. and it works fine for me 
... which version ov velocity are you using?? try to update your velocity.jar


> 
> 2) The comments at the end of the generated .sql incorrectly label the
> foreign key defintions. The keys generated for table-3 are labeled as "--
> table-2". The SQL commands are actually correct (so you do not need to
> modify the .sql if you don't want), it is just the commented labels which
> are incorrect.


i'll take a look at this

martin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>