[gme-users] OCL constraint question-simple -help needed urgent-beginner
srimathi.c at gmail.com
Thu Feb 3 22:23:09 CST 2011
Thanks for your response
I have tried what u have given
But it gives the following error
"Neither function,implicit method or implicit iterator
Thanks a lot
On Thu, Feb 3, 2011 at 10:27 PM, James H. Hill <hillj at cs.iupui.edu> wrote:
> On Feb 3, 2011, at 6:37 AM, Srimathi C wrote:
>> Dear folks
>> I have a atom called User which has a attribute Username. It is a
>> source to a connector.
>> I want to make the username unique.
>> I have tried the following constaints
>> 1.User.allInstances()->forAll(p1, p2 |
>> p1 <> p2 implies p1.Username <> p2.Username )-i am attaching a
>> constraint to that of the atom
>> 2.self.allInstances()->forAll(p1, p2 |
>> p1 <> p2 implies p1.name <> p2.name )
>> It says that in both that method meta::user:allInstances does not
>> 3. Let unameID=project.allInstancesOf(user) in unameID.isUnique(
>> i:user | i.Username)
> How about simply trying:
> gme::project::allInstancesOf (User)->isUnique (User : u | u.Username)
>> But this constraint is not working. I know this is simple.
>> But I am breaking my head for past one week for this.
>> please help me out anyone. I will be much thankful
>> gme-users mailing list
>> gme-users at list.isis.vanderbilt.edu
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
More information about the gme-users