You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Frauke Heyl <fh...@vps.de> on 2009/09/04 14:39:11 UTC

Connecting to DB2 9.7

Hello,

 

I would like to share some experiences that I had connecting to DB2 9.7
with Torque 3.3-RC2.

First of all: I also had the problem that all records received from
village where readOnly so I was not able to write data back to the
database. Is there any better solution available than patching the
village working dog? Will there be an official update to deal with that
problem?

 

Second I had to customize the templates to deal with the problem that
BOOLEANCHAR was mapped to VHARCHAR without a size declaration. This
caused a syntax error in the SQL script. I changed it to VARCHAR(1).

Further data type adaptations were necessary because some of the data
types were too small to meet our special needs, i.e. the binary data,
which I changed to BLOB.

 

Another problem is a DB2 specialty that does not allow UNIQUE
constraints on nullable columns. Since we also use other databases
without this restraint I could not find a solution for that. Does
anybody have an idea for a workaround?

 

One final question: How far is DB2 9.7 already supported by Torque?

Does anyone have experience with it and likes to share the experiences
with us so were are prepared to further problems we might meet?

 

Regards 

Frauke

 

Re: Connecting to DB2 9.7

Posted by Thomas Vandahl <tv...@apache.org>.
Frauke Heyl wrote:
> I would like to share some experiences that I had connecting to DB2 9.7
> with Torque 3.3-RC2.

Thanks for your comments. I'd strongly suggest to use 3.3 release, however.

> First of all: I also had the problem that all records received from
> village where readOnly so I was not able to write data back to the
> database. Is there any better solution available than patching the
> village working dog? Will there be an official update to deal with that
> problem?

I'm not aware of the problem. Would you consider opening a JIRA issue? A
separate release of village would allow to fix a long outstanding Oracle
issue as well.

> Second I had to customize the templates to deal with the problem that
> BOOLEANCHAR was mapped to VHARCHAR without a size declaration. This
> caused a syntax error in the SQL script. I changed it to VARCHAR(1).
[...]
> Further data type adaptations were necessary because some of the data
> types were too small to meet our special needs, i.e. the binary data,
> which I changed to BLOB.

Patches are welcome.

> Another problem is a DB2 specialty that does not allow UNIQUE
> constraints on nullable columns. Since we also use other databases
> without this restraint I could not find a solution for that. Does
> anybody have an idea for a workaround?

My experience with MySQL is along those lines. You *can* set a unique
index on a nullable column, it just doesn't work...

> One final question: How far is DB2 9.7 already supported by Torque?

Not officially. The problem always is that for tests it would be
necessary to have all DBMS available which is next to impossible. Again
I'd like to encourage you to submit your contributions.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org