@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.

Reply via email to