• 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: ERRest and returning an Array of dictionaries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERRest and returning an Array of dictionaries


  • Subject: Re: ERRest and returning an Array of dictionaries
  • From: Matthew Ness <email@hidden>
  • Date: Sat, 09 Mar 2013 10:04:31 +1100


On 09/03/2013, at 8:11 AM, Paul Yu wrote:

Greetings

I am trying to return a list of the primary keys of a toMany relationship on an EO.

I've written a method on the EO to put the keys into NSMutableDictionaries and added them an NSMutableArray.  I then return the array to my rest controller.

This is NOT working as I would have expected.  What am I missing and is there a video that I should watched?

Thanks

Paul
____


Hi Paul,

Maybe I'm not fully understanding your requirement, but can you not just create a custom filter in your 'owner' controller, say CompanyController:


public static ERXKeyFilter someRelationshipFilter(){

ERXKeyFilter filter = ERXKeyFilter.filterWithNone();
filter.include(Company.EMPLOYEES).include(Employee.PK_CUSTOM_KEY);
return filter;
}


where a Company has many Employee objects, and in Employee.java:

public static final ERKKey<String> PK_CUSTOM_KEY = new ERKKey<String>("primaryKey");


Or is that barking up the wrong tree? Do you need the ids to be flattened in the response graph, or (in this case) the Employee element _not_ to be emitted?


I think you'd get the id attribute for free in the graph here anyway.


Cheers,

-- 
Matt.

http://logicsquad.net/


 _______________________________________________
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: 
 >Re: D2W edit embedded buttons? (From: Theodore Petrosky <email@hidden>)
 >Re: D2W edit embedded buttons? (From: Jesse Tayler <email@hidden>)
 >Re: D2W edit embedded buttons? (From: David Holt <email@hidden>)
 >Re: D2W edit embedded buttons? (From: David Avendasora <email@hidden>)
 >Re: D2W edit embedded buttons? (From: Jesse Tayler <email@hidden>)
 >Re: D2W edit embedded buttons? (From: David LeBer <email@hidden>)
 >ERRest and returning an Array of dictionaries (From: Paul Yu <email@hidden>)

  • Prev by Date: ERRest and returning an Array of dictionaries
  • Next by Date: Re: ERRest and returning an Array of dictionaries
  • Previous by thread: ERRest and returning an Array of dictionaries
  • Next by thread: Re: ERRest and returning an Array of dictionaries
  • Index(es):
    • Date
    • Thread