[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.ocl] Re: OCLConsole Saving Error: The 'no duplicates' constraint is violated

Hi Richard

You provide no clues as to what you are saving, so I can do little more than elaborate the message, which occurs when the same EObject is added
more than once to an EList that enforces unique content.


So for some reason you are adding a duplicate expression; most likely
a singleton value such as (Ocl)Invalid that may have arisen more than once.

You need to investigate waht is duplicated and where each one came from.

When you tell us how to reproduce the problem we may be able to improve the error message.

	Regards

		Ed Willink


Richard Catlin wrote:
I am getting this error when I try to save an OCL expression to an xmi file.

public void setOCLExpression(OCLExpression<Object> expr) {
// add my expression as the first root, because I already contain
// variables and EPackages defining dynamically-generated types
    getContents().add(0, expr);
}

Exception:
"Error Saving OCL Expression, The 'no duplicates' constraint is violated"

Any help is appreciated.

Regards,
Richard Catlin