db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From torque-...@db.apache.org
Subject [DB Torque Wiki] Updated: PostgreSQLFAQ
Date Fri, 20 Aug 2004 12:14:45 GMT
   Date: 2004-08-20T05:14:45
   Editor: ScottEade <seade@backstagetech.com.au>
   Wiki: DB Torque Wiki
   Page: PostgreSQLFAQ
   URL: http://wiki.apache.org/db-torque/PostgreSQLFAQ

   no comment

Change Log:

@@ -6,6 +6,8 @@
 == I have problems using idMethod='native'.  What's up? ==
+'''Note: This issue has been dealt with in cvs (HEAD and TORQUE_3_1_BRANCH) - if you are
using release 3.1.1 or later you do not need to use the workaround described below.''' --
ScottEade 2004-08-20
 PostgreSQL creates a sequence with a special name for the autoincrement.  In order to get
Torque to interact gracefully with this sequence, you need to tell it the sequence name. 
In addition, Postgres restricts the sequence name to 30 characters, which means that the names
get truncated strangely.  Thus, to get everything to work, you basically need to do the following:
  1. include a <id-method-parameter name="seqName" value="Tablename_columnname_seq"/>
in every table that has an "autoincrement" column.
  1. If the "tablename_columnname" combination is longer than 26 letters, it will get truncated
to 26 letters by Postgres .  You need to figure out the truncated name.  The best way to find
it is:
@@ -80,8 +82,7 @@
 == Do I need to patch the PostgreSQL driver to work with Torque? ==
-You do not need to apply any patches to the Postgres driver in order to use Torque <strong>unless</strong>
-you want to use "large objects" (CLOBS/BLOBS).   
+You do not need to apply any patches to the Postgres driver in order to use Torque '''unless'''
you want to use "large objects" (CLOBS/BLOBS).   
 The "patch issue" dates from the time when Torque was tightly coupled with Turbine.  It arose
primarily because Turbine stored a hashmap 
 of user information directly in the database.  This data was stored as a BLOB.  
@@ -104,3 +105,4 @@
  *  Multiple unique column definitions are currently generated with the same constraint name.
    *  I have confirmed that this problem is still present in Torque 3.1 and that it applies
to index as well as unique.  The workaround is to provide the name of the constraint manually
using a "name" attribute on the index and unique elements in cases where more than one exists
for a given table. -- ScottEade 2003-10-09
  *  Columns declared as type CHAR are returned as space padded Strings by PostgreSQL but
are not by MySQL.  I'm wondering if Troque shouldn't strip the trailing spaces off these automatically.
 The workaround is to add a setter to the non-Base Torque class for the object that uses String.trim()
to remove the spaces. -- ScottEade 2003-11-05
+ *  The jdbc target (torque:jdbc goal in Maven-speak) does not produce the correct DDL SQL
for serial columns. -- ScottEade 2004-08-20

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

View raw message