Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » CDO - Duplicate of the 'xxx' for the key 1
CDO - Duplicate of the 'xxx' for the key 1 [message #601345] Thu, 18 January 2007 11:04
Gregoire DUPE is currently offline Gregoire DUPEFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

When I run the following program, I get a "DataIntegrityViolation"
exception in the server side.

public X a2x(A self) {
X result = MMBFactory.eINSTANCE.createX();
destModel.getContents().add(result);
EList uList = new BasicEList();
for (int i = 0; i < 2; i++) {
U anonym1 = MMBFactory.eINSTANCE.createU();
destModel.getContents().add(anonym1);
anonym1.setUattr("X" + i);
uList.add(anonym1);
resourceManager.commit();
}
result.getUref().addAll(uList);
resourceManager.commit();
return result;
}

Here you can find the exception stack trace:

Exception in thread "pool-1-thread-4"
org.springframework.dao.DataIntegrityViolationException:
PreparedStatementCallback; SQL [INSERT IGNORE INTO CDO_OBJECT VALUES (?, 1,
?)]; Duplicata du champ '844424930132030' pour la clef 1; nested
exception is java.sql.SQLException: Duplicata du champ '844424930132030'
pour la clef 1
java.sql.SQLException: Duplicata du champ '844424930132030' pour la clef 1
(We can translate "Duplicata du champ '844424930132030' pour la clef 1"
by "Duplicate of the '844424930132030' for the key 1".)

This exception append when we commit after the
"result.getUref().addAll(uList);" instruction.

The output meta-model contains 2 classes X and U. X is composed of U.

Can anybody explain, what's wrong in this use of CDO?

Thanks,
Gregoire
Previous Topic:[Announce] EMFT EODM 0.8.0M4 is available
Next Topic:Teneo: performance fall of HibernatePersistableEList
Goto Forum:
  


Current Time: Fri Feb 26 11:08:07 GMT 2021

Powered by FUDForum. Page generated in 0.01491 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top