[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1984?page=c...
]
Wim Praet commented on HHH-1984:
--------------------------------
My guess is that the "values ..." statements for DB2 UDB must be rewritten as
"select ... from sysibm.sysdummy1" for DB2 on OS/390 or z/OS.
The same goes just as well for the identity id query ("select identity_val_local()
from sysibm.sysdummy1" instead of "values identity_val_local()"), and as
from DB2 v8 on z/OS, which supports sequences, for the sequence next/previous value select
string ("select nextval/prevval for <sequencename> from sysibm.sysdummy1"
instead of "values nextval/prevval for <sequencename>"). With regard to
this sequence support in DB2v8 z/OS, the DB2OS390Dialect should be subclassed as well to
mark that sequences are supported, and with a correct implementation of the
getSequenceNextValString(String sequenceName):
public String getSequenceNextValString(String sequenceName) {
return "select nextval for " + sequenceName + " from
sysibm.sysdummy1";
}
I wonder if the getCurrentTimestampSQLFunctionName() shouldn't be changed as well in
the DB2OS290Dialect.java to:
public String getCurrentTimestampSQLFunctionName() {
return "current_timestamp";
}
instead of returning "sysdate" (I can't test right now since I don't
have access to a DB2 z/OS at this moment). I've seen this in HHH-1754 as a proposed
fix.
DB2 390/zOS dialect getCurrentTimestampSelectString
---------------------------------------------------
Key: HHH-1984
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1984
Project: Hibernate3
Type: Bug
Versions: 3.1.3
Environment: Appserver: WebSphere 6.1, OS: zLinux 390
db: DB2 8.1 on z/OS
Reporter: Brindl Ronald
the DB2390Dialect uses
public String getCurrentTimestampSelectString() {
return "values current timestamp";
}
for currentTimestampSelectString, which produces error -142 (The SQL statement is not
supported).
the correct method is:
public String getCurrentTimestampSelectString()
{
return "select current timestamp from sysibm.sysdummy1";
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira