emmanuel wrote:
You must give more info,
What is your DB schema (constaints), the exact Hibernate SQL etc
Ok. I understand.
My DB schema after schema-export:
Code:
CREATE TABLE SCOTT.GLOBAL (
GLOBAL_ID NUMBER(19,0) NOT NULL,
CONTACT_ID NUMBER(19,0),
PRIMARY KEY(GLOBAL_ID)
)
GO
ALTER TABLE SCOTT.GLOBAL
ADD CONSTRAINT FKEE5418878391FD86
FOREIGN KEY(CONTACT_ID)
REFERENCES SCOTT.CONTACT(CONTACT_ID)
GO
CREATE TABLE SCOTT.CASE (
GLOBAL_ID NUMBER(19,0) NOT NULL,
NAME char,
PRIMARY KEY(GLOBAL_ID)
)
GO
ALTER TABLE SCOTT.CASE
ADD CONSTRAINT FK1B15F7B4F3F68A5C
FOREIGN KEY(GLOBAL_ID)
REFERENCES SCOTT.GLOBAL(GLOBAL_ID)
GO
Hibernate log:
[code]
11:35:20,593 DEBUG SessionImpl:413 - opened session
11:35:20,593 DEBUG JDBCTransaction:36 - begin
11:35:20,609 DEBUG Cascades:208 - unsaved-value: -1
11:35:20,609 DEBUG SessionImpl:1201 - saveOrUpdate() unsaved instance with id: -1
11:35:20,609 DEBUG BatcherImpl:166 - about to open: 0 open PreparedStatements, 0 open ResultSets
11:35:20,609 DEBUG SessionFactoryImpl:526 - prepared statement get: select hibernate_sequence.nextval from dual
11:35:20,609 DEBUG SessionFactoryImpl:536 - preparing statement
11:35:20,609 DEBUG SequenceGenerator:70 - Sequence identifier generated: 203
11:35:20,609 DEBUG BatcherImpl:173 - done closing: 0 open PreparedStatements, 0 open ResultSets
11:35:20,609 DEBUG SessionFactoryImpl:554 - closing statement
11:35:20,609 DEBUG SessionImpl:656 - saving [com.organization.Case#203]
11:35:20,609 DEBUG Cascades:208 - unsaved-value: -1
11:35:20,625 DEBUG SessionImpl:2011 - flushing session
11:35:20,625 DEBUG SessionImpl:2113 - Flushing entities and processing referenced collections
11:35:20,625 DEBUG AbstractEntityPersister:216 - com.organization.Case.messageBlob is dirty
11:35:20,625 DEBUG SessionImpl:2209 - Updating entity: [com.organization.Case#203]
11:35:20,625 DEBUG SessionImpl:2397 - Processing unreferenced collections
11:35:20,625 DEBUG SessionImpl:2408 - Scheduling collection removes/(re)creates/updates
11:35:20,625 DEBUG SessionImpl:2023 - Flushed: 1 insertions, 1 updates, 0 deletions to 1 objects
11:35:20,625 DEBUG SessionImpl:2028 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
11:35:20,625 DEBUG SessionImpl:2058 - executing flush
11:35:20,625 DEBUG NormalizedEntityPersister:479 - Inserting entity: com.organization.Case#203
11:35:20,625 DEBUG BatcherImpl:166 - about to open: 0 open PreparedStatements, 0 open ResultSets
11:35:20,625 DEBUG SessionFactoryImpl:526 - prepared statement get: insert into GLOBAL ( CONTACT_ID, GLOBAL_ID ) values ( ?, ?)
11:35:20,625 DEBUG SessionFactoryImpl:536 - preparing statement
11:35:20,625 DEBUG BatcherImpl:166 - about to open: 1 open PreparedStatements, 0 open ResultSets
11:35:20,625 DEBUG SessionFactoryImpl:526 - prepared statement get: insert into CASE (NAME, GLOBAL_ID) values (?, ?)
11:35:20,625 DEBUG SessionFactoryImpl:536 - preparing statement
11:35:20,625 DEBUG NormalizedEntityPersister:361 - Dehydrating entity: com.organization.Case#203
11:35:20,625 DEBUG Cascades:208 - unsaved-value: -1
11:35:20,625 DEBUG LongType:44 - binding '183' to parameter: 1
11:35:20,640 DEBUG LongType:44 - binding '203' to parameter: 2
11:35:20,640 DEBUG StringType:44 - binding 'name' to parameter: 1
11:35:20,640 DEBUG LongType:44 - binding '203' to parameter: 2
11:35:20,687 DEBUG JDBCExceptionReporter:36 - SQL Exception
java.sql.SQLException: ORA-02291: