openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wisneski (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1186) @DataStoreId(strategy=GenerationType.IDENTITY) does not work in DB2
Date Mon, 20 Jul 2009 19:22:15 GMT
@DataStoreId(strategy=GenerationType.IDENTITY) does not work in DB2
-------------------------------------------------------------------

                 Key: OPENJPA-1186
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1186
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
         Environment: DB2 
            Reporter: David Wisneski


Entity is defined as follows.   Table is created corrected with IDENTITY generate value for
column "ID" 
When entity is persisted,  an Exception is thrown at flush saying database returned  null
value for ID which is incorrect.

@Entity
@Table(name="NodeHistory")
@DataStoreId(strategy=GenerationType.IDENTITY)   // default column name = ID
public class History {
	long time;  //time 
	@Column(length=80)
	String entry;
	@OneToOne(cascade={CascadeType.PERSIST})
	History previous;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message