• 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: Setting relationship is fetching all objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting relationship is fetching all objects


  • Subject: Re: Setting relationship is fetching all objects
  • From: Pascal Robert <email@hidden>
  • Date: Tue, 31 Jul 2012 15:51:30 -0400

Le 2012-07-31 à 15:39, Maik Musall a écrit :

>
> Am 31.07.2012 um 21:29 schrieb Pascal Robert:
>
>> I have a weird problem or maybe I'm just stupid. In awakeFromInsertion, I want to set a relationship (transactionType) on all new Transaction EOs. So I did this:
>>
>> @Override
>> public void awakeFromInsertion(EOEditingContext editingContext) {
>>   super.awakeFromInsertion(editingContext);
>>   setQuantity(1);
>>   TransactionType standardType = TransactionType.fetchTransactionType(editingContext, TransactionType.NAME_KEY, TransactionType.STANDARD_TYPE);
>>   setTransactionTypeRelationship(standardType);
>> }
>>
>> The problem? When setTransactionTypeRelationship is called, it fetches ALL transactions of the "Standard" type, returning 50854 objects. Why is that happening?
>
> Because you have an unnecessary reverse relationship from TransactionType to Transaction, which needs to be validated at that point?

I do have a relation TransactionType ->>  Transaction, and I tried to "hide" it and it had the same behavior. So I removed the relationship and everything is good now.
 _______________________________________________
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: Setting relationship is fetching all objects
      • From: Ramsey Gurley <email@hidden>
References: 
 >Setting relationship is fetching all objects (From: Pascal Robert <email@hidden>)
 >Re: Setting relationship is fetching all objects (From: Maik Musall <email@hidden>)

  • Prev by Date: Re: Setting relationship is fetching all objects
  • Next by Date: Re: what did I break with ant?
  • Previous by thread: Re: Setting relationship is fetching all objects
  • Next by thread: Re: Setting relationship is fetching all objects
  • Index(es):
    • Date
    • Thread