• 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
On ERPartials
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On ERPartials


  • Subject: On ERPartials
  • From: Ângelo Andrade Cirino <email@hidden>
  • Date: Tue, 13 May 2014 15:38:45 -0300

Hi,

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.

I created the ContactMechanism and Phone entities, Phone being a partial entity of ContactMechanism. I then added a one to many relationship from Phone to Party, so that a Party has many Phones.

The generated SQL doesn't create a join or consider the two tables, ContactMechanism and Phone, and gives an obvious exception with the following generated SQL:

EvaluateExpression failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT t0.areaCode, t0.contactMechanismTypeID, t0.countryCode, t0.created, t0.extension, t0.id, t0.isMain, t0.lastModified, t0.nonSolicitationIndication, RTRIM(t0.number), t0.partyID FROM ContactMechanism t0 WHERE t0.partyID = ?" withBindings: 1:9(partyID)>: Next exception:SQL State:42S22 -- error code: 1054 -- msg: Unknown column 't0.areaCode' in 'field list'

This SQL is generated for the phones relationship from Party.

It seems that I didn't grasp how to use partials. Any suggestions or should I rely on inheritance instead?

Angelo
 _______________________________________________
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: On ERPartials
      • From: Paul Hoadley <email@hidden>
  • Prev by Date: Re: Java Monitor configuration not working under windows
  • Next by Date: calendar component?
  • Previous by thread: Re: Java Monitor configuration not working under windows
  • Next by thread: Re: On ERPartials
  • Index(es):
    • Date
    • Thread