SQL error saving a tech note due to a duplicate entry

Asked By 0 points N/A Posted on -
qa-featured

Hello experts,

While I was working on a project this error appeared during the save of a note. Any solution ? Please help me to skip this error because I really need to finish my project on time. Also please tell me how can I prevent this to appear in the future.

Thank you experts !

 

 

Com.webobjects.eoaccess.EOGeneralAdaptorException:EvaluateExpression failed: Next exception:SQL State:23000—error code:1062—msg: Duplicate entry ‘829’ for key ‘PRIMARY’

SHARE
Answered By 0 points N/A #179724

SQL error saving a tech note due to a duplicate entry

qa-featured

Hello,

It happens when the parent entity is in another model or when it is coming after the current entity in the alphabetically ordered.

To solve the problem :

If the abstract parent entity name is ‘flower’ you are fetching the concrete sub-entity "Anemone" while both entities are part of the same model, you can get this kind of exception on the first "Anemone" fetch.

In the text edito,edit the ‘index eomodeld and reorder the entities references in the array and putting parent entities above sub-entities.

Every time you modify and save the model You will have to record entities.

Related Questions