Bug 215 : @GeneratedValue(strategy = GenerationType.IDENTITY) with Postgres and Oracle
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.4.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
11/02/2010
Updated 
11/02/2010
Type 
Bug
 
Attachments 
No attachments

Explicitly using GenerationType.IDENTITY ... with Database platforms that do NOT support Identity such as Postgres and Oracle does not work.

This results in errors such as the ID value being null resulting in insert statement failing.

 
Rob 11 Feb 09:49
The fix

The fix is check if the DB platform supports Identity ... and if not ignore that setting.

This is the case now for Oracle and Postgres. Note the reverse check (ignoring Sequence when that is not supported) already existing - for example MySql ignores Sequence generation type.

Rob 11 Feb 10:00
Fixed in HEAD

Fixed in HEAD.

woResponse

Upload a file