openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garimella Srinivas <garimella_srini...@yahoo.co.in>
Subject Id generation - regarding
Date Thu, 01 Apr 2010 08:55:46 GMT
I have an entity PhoneNo with @id as follows
@Id
 @TableGenerator(name="PhoneBook_IDGen", table="ID_GEN_TABLE",       pkColumnName="Gen_Name",
valueColumnName="Gen_ID_Value", pkColumnValue="PhoneBook_IDGen", initialValue = 1, allocationSize
= 100)  

@GeneratedValue(strategy=GenerationType.TABLE,generator = "PhoneBook_IDGen")
    public long getId() {
        return this.id;
    }


Every time the server/openjpa is started  the id table is updated  and the id starts with
an icrement of 100. If I have 2 asthe last id id for first run the second run starts with
100.

However the the id needs to be 3 for the next entity. Is some thing wrong? 
Thanks 
G Srinivas



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message