Re: On ERPartials
Re: On ERPartials
- Subject: Re: On ERPartials
- From: Paul Hoadley <email@hidden>
- Date: Wed, 14 May 2014 07:54:08 +0930
Hi Angelo,
On 14/05/2014, at 4:08 AM, Ângelo Andrade Cirino <email@hidden> wrote:
> I am trying to model a ContactMechanism entity with three specialized entities representing Phone, Email and PostalAddress. I followed the ERPartial documentation and example and thought that I would be able to model composition instead of inheritance using ERPartials. Since the three specialized entities are very different from each other, each one has its own table.
This is going to be a show-stopper. Partial entities work with a single table.
> It seems that I didn't grasp how to use partials. Any suggestions or should I rely on inheritance instead?
Personally I'm not a big fan of inheritance (in EOModels), especially across models, which is the use case that partial entities was originally developed to help with. (The classic example, as described in the package-level Javadocs, being a "Person" entity in a reusable framework, and application level specialisations of that entity for the project at hand.) I don't know whether partial entities will be a good fit for the case you describe above, but I can assure you that they do work. I would suggest that firstly you go over the example in Examples/ERXPartials (again if you've already done so!), and secondly create you own toy application using partial entities to see how it all works. Well worth the time investment, even if you don't end up using them.
--
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: | |
| >On ERPartials (From: Ângelo Andrade Cirino <email@hidden>) |