Are you serious!  arrggh! :)

Yes it is certainly doable for version numbers.  

It is actually probably doable for vm-based timestamps also.  We could
either use jdbc escape syntax (because I know how much you love this) to
convert the string to a timestamp or, provided we knew the expected date
string format, just embed the date string.

UserVersionTypes might possibly even be doable.  I'd have to think it
through a bit.

_____________________________________________
From: Gavin King 
Sent: Saturday, August 13, 2005 5:39 PM
To: Steve Ebersole
Cc: hibernate-devel@lists.sourceforge.net
Subject: Insert...select... And version numbers

I discovered that DB2 does not support parameters in the select clause
of SQL insert .... select .... queries.

This is a bit of a problem for the auto-version seeding stuff. Currently
we generate SQL like this:

    insert (id, version, ...) values (seq.nextval, ?, ... )

I do have a temporary workaround for DB2, but I'm wondering how much
work it would be to generate the following SQL instead:

For integral version types:

    insert (id, version, ...) values (seq.nextval, 0, ... )

For <timestamp source="db"/>

    insert (id, version, ... ) values (seq.nextval, sysdate, .... )

We are still going to need parameters for UserVersionTypes and
<timestamp source="jvm"/>.

Steve, what do you think?


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to