Hi Mike, Andrus,
sorry that I didn't followup on this further
(I'm somewhat under water...).
Short summary of the problems I encountered
in my research with Oracle:
- the return-value(s) of the execute(Batch) methods
are always "-2", which is still JDBC complient ( )
and which is docuemented by Oracle
- the alternative "getUpdateCount()" works mostly.
However, with a really sublte problem in conjunction
with prepared-statement caching:
-> the oracle spaghetti contains a complicated
"hidden state" that makes it fail with prep-statement
caching.
Since prep-statement caching is not really part of cayenne,
you could ignore that problem (but well, it's also possible
to use cayenne with an external data-source doing the
prep-statement caching, and then the problem will be similar)
To handle that, I once developed a dirty fix using reflection
on default access fields to fix it, but this is really nasty.
regards,
Arndt
Mike Kienenberger schrieb:
>Andrus Adamchik <andru..bjectstyle.org> wrote:
>
>
>>Original plans for optimistic locking were to use JDBC update count to
>>tell if a row was updated or not (and include all "locked" fields in
>>the WHERE clause). Unfortunately this information is not always
>>available from the driver (esp. with batch updates that are enabled by
>>default). Arndt has been patching some things on his own (some of which
>>included patches to Oracle driver). I leave it up to him to comment
>>further. My feeling is that we still need more research on that.
>>
>>
>
>Can the framework start off by doing it the "right" way (using the JDBC
>update count), and we go from there? We can document (when known) what
>drivers DON'T work and under what conditions, then let those most interested
>either get the driver itself fixed or fix the driver plugin (or maybe even
>disable batch updates by plugin)?
>
>Once something is in place, the rest of us can try to fit it to our needs.
>However, I don't feel qualified to put the basic mechanism in place.
>
>-Mike
>
>
This archive was generated by hypermail 2.0.0 : Tue Sep 16 2003 - 12:46:40 EDT