• 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: ERXEC question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXEC question


  • Subject: Re: ERXEC question
  • From: Ramsey Gurley <email@hidden>
  • Date: Mon, 12 Aug 2013 10:51:14 -0700

You can use an ERXFetchSpec to include objects that only exist in the EC. I believe there's a bug in that which causes duplicate EOs to show up when using nested ECs though.

On Aug 12, 2013, at 10:37 AM, Lars Sonchocky-Helldorf wrote:

> Hi list,
>
> we are creating a new EO and insert it into an ERXEC like this:
>
>  public static PaymentCustomer createPaymentCustomer(EOEditingContext editingContext, Integer creditScore, String fullQualifiedClassName, Integer ingameId)
>  {
>    PaymentCustomer eo = (PaymentCustomer) EOUtilities.createAndInsertInstance(editingContext, _PaymentCustomer.ENTITY_NAME);
>    eo.setCreditScore(creditScore);
>    eo.setFullQualifiedClassName(fullQualifiedClassName);
>    eo.setIngameId(ingameId);
>    return eo;
>  }
>
> later we want to access this EO like this (before calling savingChanges of the ERXEC, the edtingContext is the same):
>
> NSArray<PaymentCustomer> paymentCustomerTest = PaymentCustomer.fetchAllPaymentCustomers(this.editingContext());
>
> this results in an empty NSArray.
>
>
> Debugging this code revealed that there's nothing in _insertedObjects of this ERXEC but in _unprocessedInserts. When calling processRecentChanges() of this ERXEC before "fetching" everything works like expected.
>
>
> My Question now is: why is this call to processRecentChanges() necessary at all and is it the right solution for our problem? http://comments.gmane.org/gmane.comp.web.webobjects.devel/24056 seems to suggest otherwise. So what would be "the right thing to do™"?
>
>
> best regards,
>
> 	Lars
> _______________________________________________
> 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


References: 
 >ERXEC question (From: Lars Sonchocky-Helldorf <email@hidden>)

  • Prev by Date: ERXEC question
  • Next by Date: Re: ERXEC question
  • Previous by thread: ERXEC question
  • Next by thread: Re: ERXEC question
  • Index(es):
    • Date
    • Thread