I have uploaded a release candidate for Ebean v2.2.0.
People can download it from here:
http://groups.google.com/group/ebean/files
If you could try this out against Oracle9 that would be great (Oracle9
is now treated the same as Oracle10).
Note that there was some confusing code WRT IdType.GENERATOR and
IdType.SEQUENCE - mostly due to the previous use of getGeneratedKeys
with Oracle10. I have refactored that code so I believe it should be
easier to understand. All DB's have a default of IdType.SEQUENCE
(Oracle, Postgres, H2) or IdType.IDENTITY (mysql, sql server) as the
default strategy.
IdType.GENERATOR is typically for UUID types. Note that if the @Id
type is a UUID then Ebean will automatically assign a UUID specific
generator for that bean type.
Note: there is a Gotcha using JDBC statement batching
(PreparedStatement.addBatch() PreparedStatement.executeBatch()) with
Oracle ... specifically we need to cast to OraclePreparedStatement to
get the row counts (for optimistic concurrency checking). This is
automatically handled if you are using Ebeans DataSource
implementation but *NOT* if you are using another connection pool.
Anyway, I will be busy documenting this over the next week or so prior
to releasing Ebean 2.2.0.
Cheers, Rob.
On Nov 6, 9:34 am, Rob Bygrave <
robin.bygr...@gmail.com> wrote:
> Ok, I'll have to have a look at this ... but there is an interesting story
> here ...
>
> Note that with the next version of Ebean the strategy for using Sequences in
> Oracle (and other Db's with Sequences - Postgres/H2) has changed.
>
> The reason for this change is that we want to transparently use JDBC
> batching PreparedStatement.addBatch() PreparedStatement.executeBatch() etc.
>
> ... now, Oracle10 supports getGeneratedKeys but *NOT* when used with JDBC