Bug 167 : Oracle + DDL Generation + MappedSuperClass + generatedKeys
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.2.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
17/10/2009
Updated 
17/10/2009
Type 
Bug
 
Attachments 
No attachments

There was an Oracle specific bug due to the DDL generation and ordering of properties (and hence columns).

The DDL generation doesn't always put the primary key as the first column in the table and this mostly occurs when using MappedSuperClass which holds the @Id property.

The issue is the returning of the generated key value from Oracle. This is actually based on the table column order and not the column insert order - and we can get back the wrong value as the generated id.

 
Rob 28 Oct 07:38
Batch JDBC

Oracle JDBC driver doesn't support getGeneratedKeys for JDBC batch processing.

For this reason, the ID generation will work different for Oracle using sequences prior to binding the insert. We will use batch loading of sequences to make this more efficient (with a configurable batch size).

Rob 28 Oct 07:39
Fixed in HEAD

Fixed in HEAD.

woResponse

Upload a file