• 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: How to fetch an entity from an id ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to fetch an entity from an id ?


  • Subject: Re: How to fetch an entity from an id ?
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 20 Aug 2014 19:10:03 +0000
  • Thread-topic: How to fetch an entity from an id ?

It is in EOUtilities

static EOEnterpriseObject objectWithPrimaryKey(EOEditingContext ec, String entityName, NSDictionary pkDict) 
          Fetches the Enterprise Object identified by the specified primary key dictionary.

On 2014-08-20, 12:07 PM, "Fred Opims" wrote:

Thank you John!
I've used this format in an url.
But how can i fetch Person 100 with fetch methode directly in Java ?

Here are the fetch method provided in a ERXGenericRecord.

I have not found a method using the primary key.

public static ERXFetchSpecification<User> fetchSpec() 
public static NSArray<User> fetchAllUsers(EOEditingContext editingContext)
public static NSArray<User> fetchAllUsers(EOEditingContext editingContext, NSArray<EOSortOrdering> sortOrderings)
public static NSArray<User> fetchUsers(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings)
public static User fetchUser(EOEditingContext editingContext, String keyName, Object value)
public static User fetchUser(EOEditingContext editingContext, EOQualifier qualifier)
public static User fetchRequiredUser(EOEditingContext editingContext, String keyName, Object value)
public static User fetchRequiredUser(EOEditingContext editingContext, EOQualifier qualifier)

Thank you!



On Wed, Aug 20, 2014 at 2:27 PM, John Huss <email@hidden> wrote:
.../Person/100

It's <entityName>/<primaryKey>


On Wed, Aug 20, 2014 at 12:26 PM, Fred Opims <email@hidden> wrote:
Hello!
I'm using ErRest and i would like to fetch an entity from an id.

So far  I'm using an keyName (attribute) to fetch an entity. For the case i'm working on, I only have its id.

Do you know how to do that ?

Thank you

Best!

Fred

 _______________________________________________
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


 _______________________________________________
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: How to fetch an entity from an id ?
      • From: Fred Opims <email@hidden>
    • Re: How to fetch an entity from an id ?
      • From: Ray Kiddy <email@hidden>
References: 
 >How to fetch an entity from an id ? (From: Fred Opims <email@hidden>)
 >Re: How to fetch an entity from an id ? (From: John Huss <email@hidden>)
 >Re: How to fetch an entity from an id ? (From: Fred Opims <email@hidden>)

  • Prev by Date: Re: How to fetch an entity from an id ?
  • Next by Date: Re: How to fetch an entity from an id ?
  • Previous by thread: Re: How to fetch an entity from an id ?
  • Next by thread: Re: How to fetch an entity from an id ?
  • Index(es):
    • Date
    • Thread