• 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: Using composition instead of inheritance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using composition instead of inheritance


  • Subject: Re: Using composition instead of inheritance
  • From: Mike Schrag <email@hidden>
  • Date: Tue, 29 May 2012 18:31:46 -0400

FrameworkPerson (and all code in the framework refers to that) and AppPerson (extends FrameworkPerson class, and all app code refers to that). When your models load, replace FrameworkPerson entity with AppPerson entity, so fetches for FrameworkPerson are secretly the equivalent to what AppPerson fetches would be. This is assuming EVERY row in your person table is an AppPerson in any given app.

ms

On May 29, 2012, at 6:28 PM, Paul Hoadley <email@hidden> wrote:

> On 30/05/2012, at 7:55 AM, Mike Schrag wrote:
>
>> In the absence of the fancier solution (something like partial entities), I think I would make an app variant of the entity (where the class of the app one extends the class of the framework one) and model-rewrite the non-app variant to be the app variant.
>
> What do you mean by the last bit: "model-rewrite the non-app variant to be the app variant"?
>
>
> --
> Paul.
>
> 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

  • Follow-Ups:
    • Re: Using composition instead of inheritance
      • From: Paul Hoadley <email@hidden>
References: 
 >Using composition instead of inheritance (From: Paul Hoadley <email@hidden>)
 >Re: Using composition instead of inheritance (From: Ken Anderson <email@hidden>)
 >Re: Using composition instead of inheritance (From: Paul Hoadley <email@hidden>)
 >Re: Using composition instead of inheritance (From: Mike Schrag <email@hidden>)
 >Re: Using composition instead of inheritance (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: D2W: Selectors for enum types?
  • Next by Date: Re: D2W: Selectors for enum types?
  • Previous by thread: Re: Using composition instead of inheritance
  • Next by thread: Re: Using composition instead of inheritance
  • Index(es):
    • Date
    • Thread