Date: 2004-04-21T17:51:03
Editor: ScottEade <[EMAIL PROTECTED]>
Wiki: DB Torque Wiki
Page: PostgreSQLFAQ
URL: http://wiki.apache.org/db-torque/PostgreSQLFAQ
no comment
Change Log:
------------------------------------------------------------------------------
@@ -72,6 +72,12 @@
While there are lots of problems with that snippet (such as the fact that the java
produced by subsequent the {{{maven torque:om}}} goal is buggy), perhaps this could be
recognized as calling the Postgresql internal function nextval
[http://www.postgresql.org/docs/7.4/interactive/functions-sequence.html
Postgresql--Sequence-Manipulation Functions], and somehow link that with the ability
to define such calls in java, as in
[http://www.postgresql.org/docs/7.4/interactive/jdbc-callproc.html Postgresql--Calling
Stored Functions]. Grepping the source tree, I saw calls to nextval in the Oracle
driver, but I didn't explore further. Perhaps this code is similar?
+== When I examine the source code I see that the PostgreSQL currval() function is
used for idMethod='native' - this cannot possibly be right since it should quite
obviously be using nextval(). ==
+
+Please read the following thread in its entirety:
+ * http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=3537
+The source also gives the impression that it is somehow using AUTOINCREMENT when
SEQUENCE would seem to be the more obvious choice. This is more of an indication of
whether or not the id should be returned before or after the insert - the names of
these things could certainly be improved.
+
== 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>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]