You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Eric Emminger <er...@ericemminger.com> on 2002/11/07 18:34:59 UTC

Re: strange torque behaviour

Marc

> I have a strange behaviour here: The sql that is produced by my dbschema.xml
> into src/sql/audiotex-schema.sql is perfectly correct:
> 
> CREATE TABLE KUNDEN
> (
>         USER_ID INTEGER NOT NULL,
>         USER_ID_ADMIN INTEGER,
>         KUNDEN_NR_GEOPHONE INTEGER,
>         NAME VARCHAR (255),
> ...
>         RG_DIREKT TINYINT (1),
>         AKTIVE_PRO_MAX INTEGER,
>         REMOTE_IP VARCHAR (15) default '0',
>     PRIMARY KEY(USER_ID),
>     FOREIGN KEY (USER_ID) REFERENCES AUDIOTEX_USER (USER_ID)
> );
> 
> 
> Now the table is created into the db, except the coloum "REMOTE_IP"!
> Why is this coloum not being created?
> Anybody having a clue what is going on here?

I had a similar experience, so I'm guessing you're using PostgreSQL.

I have a column named "remoteAddress" that was working with MySQL. When
I recently switched to PostgreSQL, the column was missing from the
database. I've tried executing the SQL generated in
WEB-INF/src/sql/project-schema.sql in psql and it works fine.

I believe the problem is that Torque is rejecting column names that
begin with 'remote.' I will post the bug to Scarab.

I worked around this problem by renaming the column to
'statRemoteAddress'. If you need, you can use the javaName attribute of
the column to keep your Java references the same.

Hope that helps you!

Eric

-- 
Eric Emminger
eric@ericemminger.com


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