[gme-users] OCL constraint question-simple -help needed urgent-beginner
Srimathi C
srimathi.c at gmail.com
Thu Feb 3 22:23:09 CST 2011
Hi
Thanks for your response
I have tried what u have given
But it gives the following error
"Neither function,implicit method or implicit iterator
[gme::project::allInstances]exists"
Thanks a lot
with regards
srimathi.c
On Thu, Feb 3, 2011 at 10:27 PM, James H. Hill <hillj at cs.iupui.edu> wrote:
> Hi,
>
> 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
>> exist
>> 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)
>
> HTH,
>
> James
>
>>
>> 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
>> regards
>> srimathi.c
>> _______________________________________________
>> gme-users mailing list
>> gme-users at list.isis.vanderbilt.edu
>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
More information about the gme-users
mailing list