• 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: WOUnit and (horizontal) inheritance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOUnit and (horizontal) inheritance


  • Subject: Re: WOUnit and (horizontal) inheritance
  • From: Paul Hoadley <email@hidden>
  • Date: Thu, 16 Aug 2012 12:48:55 +0930

Hi Henrique,

On 16/08/2012, at 1:59 AM, Henrique Prange wrote:

>> I am using a TemporaryEditingContext to test a group of related EOs.  To try and debug a test failure, I am saving the EC after the creation of each new EO.  At the point where I'm getting an IllegalArgumentException, the only new EO inserted into the EC is a subclass by horizontal inheritance of a parent EO.  Inserting the subclass and saving throws this:
>
> Could you describe the primary key(s) used in these entities?

Person, the parent:

{columnName = id; name = id; prototypeName = id; }
primaryKeyAttributes = (id);

SSPerson, the subclass:

{columnName = id; name = id; prototypeName = id; }
primaryKeyAttributes = (id);
parent = Person;

> Is it a composite primary key? Is it an Integer field?

Both non-composite, just integers.  (It's the "id" prototype from ERPrototypes.)  When running the model on PostgreSQL, the keys are generated by Person's person_seq, not ssperson_seq.

>> As noted, the only relevant difference I can see is the inheritance.  Would you expect the TemporaryEditingContext (or the memory adaptor) to have a problem with (horizontal) inheritance?
>
> Probably. I've created a sample model here to replicate your problem. I still need more information since the tests I wrote worked as expected.

I can show that when object == null in the NSMutableDictionary, the key is an EOTemporaryGlobalID, though presumably that's not going to be a great surprise.


--
Paul Hoadley
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: 
 >WOUnit and (horizontal) inheritance (From: Paul Hoadley <email@hidden>)
 >Re: WOUnit and (horizontal) inheritance (From: Henrique Prange <email@hidden>)

  • Prev by Date: Re: AjaxUpdateContainer and AjaxAutoComplete together?
  • Next by Date: Re: useDaylightTime() ??
  • Previous by thread: Re: WOUnit and (horizontal) inheritance
  • Next by thread: AjaxUpdateContainer and AjaxAutoComplete together?
  • Index(es):
    • Date
    • Thread