Title: 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?

Reply via email to