• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: directtoweb and readOnlyEntityNames rule
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: directtoweb and readOnlyEntityNames rule


  • Subject: Re: directtoweb and readOnlyEntityNames rule
  • From: David Avendasora <email@hidden>
  • Date: Wed, 30 Aug 2006 09:55:57 -0400

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: This email sent to email@hidden
  • Follow-Ups:
    • Re: directtoweb and readOnlyEntityNames rule
      • From: Steve Quirk <email@hidden>
References: 
 >directtoweb and readOnlyEntityNames rule (From: Steve Quirk <email@hidden>)
 >Re: directtoweb and readOnlyEntityNames rule (From: Steve Quirk <email@hidden>)

  • Prev by Date: Re: custom display for WOToManyRelationship destinationDisplayKey
  • Next by Date: Re: custom display for WOToManyRelationship destinationDisplayKey
  • Previous by thread: Re: directtoweb and readOnlyEntityNames rule
  • Next by thread: Re: directtoweb and readOnlyEntityNames rule
  • Index(es):
    • Date
    • Thread