OK, I reply partly to my question :
I needed to create using ?_CSV_HEADER=true at the end of the connection url...
BUT... ;)
Quote:
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().
0 [main ] ERROR org.hibernate.util.JDBCExceptionReporter - Failed to insert a new record into table PERIOD! For more information, please use SQLException.getNextException().
0 [main ] ERROR org.hibernate.util.JDBCExceptionReporter - Failed to insert a duplicate key for conflict with record 1
15 [main ] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
I do a loop that adds Period objects and saves them. After a debug, I found out that HXTT 's classes generates 2 times the same id out of a sequence (used in the HBM file)
Code:
CREATE S "S_PE" MINPE" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 401 CACHE 200 NOORDER NOCYCLE ;
The field (in HBM)
Code:
<id name="id" type="long">
<column name="ID" precision="18" scale="0" not-null="true" />
<generator class="sequence">
<param name="sequence">S_PE</param>
</generator>
</id>
HXTT always generates an ID "5784066817803503950"...
Big Bug? It qhould begin with ID="401" but does not...
Thanx