Entity(DemoEntity) with two primary key (id1 , id2) both are auto-incremented but sequence is generated for 1st configured primary key id1 not for both composite pk.
Is it not possible to configure sequence for more than one property(pk)(column) in a Entity(table) ?
INFO: -------------------------Entity Initialization Start Output Generated by Program -----------------------
INFO: Entity : [Key:DemoEntity]
INFO: Field : [Key:id2] [Type:BASIC] [DataType:java.lang.Long]
INFO: Field : [Key:id1] [Type:BASIC] [DataType:java.lang.Long]
INFO: Initializing Entity PrimaryKeys : [id2, id1]
INFO: Initializing Entity Sequencing : DemoEntity_id2_SEQ : id2
INFO: Initializing Entity Sequencing : DemoEntity_id1_SEQ : id1
EclipseLink Logging (using POSTGRESQL Database)
FINEST: Execute query DataModifyQuery(sql="CREATE TABLE DemoEntity (id2 BIGINT NOT NULL, id1 BIGINT NOT NULL, name VARCHAR(255), PRIMARY KEY (id2, id1))")
FINE: CREATE TABLE DemoEntity (id2 BIGINT NOT NULL, id1 BIGINT NOT NULL, name VARCHAR(255), PRIMARY KEY (id2, id1))
FINEST: CREATE TABLE / PRIMARY KEY will create implicit index "demoentity_pkey" for table "demoentity":00000 - null
FINEST: The table (DemoEntity) is created.
FINEST: Execute query DataReadQuery(sql="SELECT * FROM SEQUENCE WHERE SEQ_NAME = 'DemoEntity_id1_SEQ'")
FINE: SELECT * FROM SEQUENCE WHERE SEQ_NAME = DemoEntity_id1_SEQ
FINEST: Execute query DataModifyQuery(sql="INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('DemoEntity_id1_SEQ', 0)")
FINE: INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values (DemoEntity_id1_SEQ, 0)
No log Exist for second Primary Key id2 (no sequence inserted in table(SEQUENCE) for second primary key id2)
[Updated on: Wed, 12 June 2013 19:39]
Report message to a moderator