<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=952535522-13102006><FONT face=Arial color=#0000ff size=2>Such
an expression would do the job:</FONT></SPAN></DIV>
<DIV><SPAN class=952535522-13102006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=952535522-13102006><FONT face=Arial color=#0000ff size=2>let
tbs=project.allInstancesOf( Table) in tbs.isUnique( i : Table |
i.tableID)</FONT></SPAN></DIV>
<DIV><SPAN class=952535522-13102006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=952535522-13102006><FONT face=Arial color=#0000ff
size=2>Zoli</FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
gme-users-bounces@list.isis.vanderbilt.edu
[mailto:gme-users-bounces@list.isis.vanderbilt.edu] <B>On Behalf Of </B>Nicki
Lehmann Møller<BR><B>Sent:</B> Friday, October 13, 2006 2:14 AM<BR><B>To:</B>
gme-users<BR><B>Subject:</B> [gme-users] The OCL isUnique
iterator<BR><BR></FONT></DIV>
<DIV id=mb_0>Hi all, <BR><BR>I have a created a Table model that has an
attribute called tableID. This attribute should be unique. Therefore I have
created the OCL statement
<BR><BR>project.allInstancesOf(Table)->isUnique(tableID)<BR><BR>and
attached the constraint to the table object (the OnCreate event), which sadly
always evaluates to false. <BR>I'd like to note that the reason I use
project.allInstancesOf(Table) is that a table can exist in different parent
models. <BR>I any of you guys or girls could please help me I'd really be
happy. <BR><BR>Have a nice weekend<BR>-- <BR>Kind Regards, <BR><SPAN
class=sg>Nicki</SPAN></DIV><BR></BLOCKQUOTE></BODY></HTML>