• 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: Can someone explain how this ERXKey works?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can someone explain how this ERXKey works?


  • Subject: Re: Can someone explain how this ERXKey works?
  • From: Farrukh Ijaz <email@hidden>
  • Date: Wed, 14 Dec 2011 06:33:27 +0300

This is strange:

/**
 * Shortcut to return a new ERXKeyFilter(AttributesAndToOneRelationships)
 * @return a new ERXKeyFilter(AttributesAndToOneRelationships)
 */
public static ERXKeyFilter filterWithAttributesAndToOneRelationships() {
return new ERXKeyFilter(ERXKeyFilter.Base.AttributesAndToOneRelationships);
}

/**
 * Sets the base rule to AttribtuesAndToOneRelationships.
 */
public void includeAttributesAndToOneRelationships() {
setBase(ERXKeyFilter.Base.AttributesAndToOneRelationships);
}

The first method is the static method and second is instance and the instance method sets the base after creating the instance.

Farrukh

On 2011-12-13, at 11:14 PM, James Cicenia wrote:

I had originally used what you suggested. And this was the response:

ERXKeyFilter filter = ERXKeyFilter.filterWithAttributesAndToOneRelationships();
filter.include(FoodFamily.MAIN_IMAGE);

gives:



<foodFamily type="FoodFamily" id="1"/>




When I did what I did I get this response (all notice that it says ERDatabaseAttachment, this is wrong it is a File):

<foodFamily type="FoodFamily" id="1">
<mainImage type="ERDatabaseAttachment" id="1">
<available>true</available>
<configurationName nil="true"/>
<creationDate>2011-11-09T01:32:39Z</creationDate>
<height nil="true"/>
<mimeType>image/jpeg</mimeType>
<originalFileName>tomato.jpg</originalFileName>
<ownerID nil="true"/>
<proxied>true</proxied>
<size>4951</size>
<smallData nil="true"/>
<storageType>db</storageType>
<thumbnail nil="true"/>
<webPath>/1.jpg</webPath>
<width nil="true"/>
<attachmentData type="ERAttachmentData" id="1"/>
<parentAttachment nil="true"/>
</mainImage>
</foodFamily>

Regards
James




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
References: 
 >Can someone explain how this ERXKey works? (From: James Cicenia <email@hidden>)
 >Re: Can someone explain how this ERXKey works? (From: Farrukh Ijaz <email@hidden>)
 >Re: Can someone explain how this ERXKey works? (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: What wonder branch is what?
  • Next by Date: RE: ERXObjectStoreCoordinatorPool exception
  • Previous by thread: Re: Can someone explain how this ERXKey works?
  • Next by thread: What wonder branch is what?
  • Index(es):
    • Date
    • Thread