Hi Franics,
well done. Using getGeneratedKeys() from JDBC Statement is indeed much better
than
the solution now in getPostInsertAutoIncValue().
I have already created a JIRA task and will check the modifications in as soon
as possible.
The method getPostInsertAutoIncValue() will be removed completely.
I hope this will then work for all databases.
Thanks and regards
Rainer
Francis De Brabandere wrote:
> re: h2/derby
>
> I created two more drivers and i'm having roblems with my derby driver:
>
> @Override
> public Object getPostInsertAutoIncValue(DBDatabase db, Connection conn)
> {
> // FIXME need table name
> return db.querySingleInt("SELECT IDENTITY_VAL_LOCAL() FROM
> "+tableName, conn);
> }
>
> I will be needing more info in the getPostInsertAutoIncValue method as
> derby needs to know what table you want the latest identity value from
> http://db.apache.org/derby/docs/10.2/ref/rrefidentityvallocal.html
>
> now I'm asking why aren't we using the available functionality from
> JDBC (Statement.RETURN_GENERATED_KEYS)?
>
>
> --
> http://www.somatik.be
> Microsoft gives you windows, Linux gives you the whole house.
>