Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: directtoweb and readOnlyEntityNames rule



Okay, I'm going to take another stab at it. I think you're using the wrong class.

From the 5.3 API, EOKeyComparisionQualifier compares a named property of an object with a named value of another object. For example, to return all of the employees whose salaries are greater than those of their managers, you might use an expression such as "salary > manager.salary", where "salary" is the left key and "manager.salary" is the right key.

I think you should be using EOKeyValueQualifier, which the API states that it compares a named property of an object with a supplied value, which I believe is what you are doing. Based on this, You should rewrite the rule as:

     {
           author = 50;
           class = "com.webobjects.directtoweb.Rule";
           lhs = {
               class = com.webobjects.eocontrol.EOKeyValueQualifier;
               key = "session.noEdits";
               selectorName = "isEqualTo";
               value = 1;
           };
           rhs = {
               class = "com.webobjects.directtoweb.Assignment";
               keyPath = readOnlyEntityNames;
               value = (User, Group);
           };
       }

The reason the rule you wrote is not being triggered is that there is no object "1" and "1" certainly doesn't have named value so the lhs is never "True."

Again, I'm pretty new to rules writing, but I think this is correct.

Dave


On Aug 29, 2006, at 8:15 PM, Steve Quirk wrote:

class = com.webobjects.eocontrol.EOKeyComparisonQualifier;

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >directtoweb and readOnlyEntityNames rule (From: Steve Quirk <email@hidden>)
 >Re: directtoweb and readOnlyEntityNames rule (From: Steve Quirk <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.