There are two databases. The first database was created using "native" strategy for Identity. The second database was created using "assigned" strategy. Both database have tables with properties "Identity Specification" - "YES", "Not for Replication" - "NO". The call "session.replicate(object)" throws exception - Cannot insert explicit value for identity column in table "table name" when IDENTITY_INSERT is set to OFF. If I set "Identity Specification" - "No", code throws next exception - UPDATE statement conflicted with COLUMN FOREIGN KEY constraint 'FK_OBJECT2'. When I use MySQL database all works fine.
Thanks in advance!
|