I can only add 1 record to my CSV file...
Hibernate can add only 1 record. At the second, it throws :
Hibernate: select nextval('S_PE')
Hibernate: insert into PERIOD (P_BEGIN, P_END, ID) values (?, ?, ?)
Hibernate: select nextval('S_PE')
Hibernate: insert into PERIOD (P_BEGIN, P_END, ID) values (?, ?, ?)
0 [main ] ERROR org.hibernate.util.JDBCExceptionReporter - java.sql.SQLException: Failed to insert a new record into table PERIOD! For more information, please use SQLException.getNextException().
I do a loop that adds Period objects (mapped to table PERIOD) and saves them. After a debug, I found out that HXTT 's classes generates 2 times the same id out of a sequence which is found (I know sequence file is found because I had an Exception untill I provided the file with the value hereunder)
CREATE S "S_PE" MINPE" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 401 CACHE 200 NOORDER NOCYCLE ;
The field (in Hibernate's HBM)
S_PE
It should begin with ID="401" but does not...
HXTT always generates an ID "5784066817803503950"...
Big Bug?
Thanx
|
I downloaded the latest version of today.
It always generates the same ID, but does not complain about the non-uniqueness of the key.
I did not use the create table, but only put a CSV file with the header.
Result :
ID,P_BEGIN,P_END
5784066817803503950,2008-03-07 15:00:42.015,2008-03-07 15:00:42.015
5784066817803503950,2008-03-07 03:00:55,2008-03-07 03:00:55
5784066817803503950,2008-03-07 03:01:20,2008-03-07 03:01:20
5784066817803503950,2008-03-07 03:01:37,2008-03-07 03:01:37
5784066817803503950,2008-03-07 03:01:37,2008-03-07 03:01:37
...etc...
...etc...
5784066817803503950,2008-03-07 03:02:35,2008-03-07 03:02:35
5784066817803503950,2008-03-07 03:02:35,2008-03-07 03:02:35
(NOTE : for readingness, I cut a part of the data)
It stops after 50 records (trial version).
I wait for your answer before buying it. ;o)
Cheers
|