• 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: problem with Entities and inherance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with Entities and inherance


  • Subject: Re: problem with Entities and inherance
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 24 Apr 2015 18:09:41 +0000
  • Thread-topic: problem with Entities and inherance

You have to adjust the model manually.  The tables need to be adjusted manually or dropped and re-created.

Chuck

On 2015-04-24, 11:08 AM, "HOUNKPONOU Ronald" wrote:

Is it possible to change a previously (Horizontal inheritance) to Single table?
Or i have to do it manually? 

2015-04-24 17:44 GMT+01:00 HOUNKPONOU Ronald <email@hidden>:
Ok. I'll update my model.
Thanks.

2015-04-24 17:31 GMT+01:00 Chuck Hill <email@hidden>:
Single Table is usually the best choice.

On 2015-04-24, 9:30 AM, "HOUNKPONOU Ronald" wrote:

Hi Chuck,
I am using horizontal inheritance. 

I've choose it after i read  the section on inheritance in Practical WebObjects.
But i read it again may be i miss something

2015-04-24 17:26 GMT+01:00 Chuck Hill <email@hidden>:
It sounds like you used Vertical Inheritance.  I generally don’t recommend it.  One reason is that you can’t enforce foreign key constraints like this.  I suggest reading the section on inheritance in Practical WebObjects

Chuck


On 2015-04-24, 9:22 AM, "HOUNKPONOU Ronald" wrote:

Hi,
have a problem with Entities and inherance.
I have 3 Entities AbstractPerson, Person and Account.

AbstractPerson is abstract.

Person inherit from AbstractPerson.
An AbstractPerson can have many Accounts.
I can esaly create a Person.
The problem is that when I try to insert an Account that belongs to a Person, i got this ERROR :

ERROR: an  insert or update instruction on the « Account » violate the foreign key constraint « account_abstractperson_fk »
Details: The key (abstractpersonid)=(1) is not present in the table « abstractperson ».



 _______________________________________________
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: 
 >problem with Entities and inherance (From: HOUNKPONOU Ronald <email@hidden>)
 >Re: problem with Entities and inherance (From: Chuck Hill <email@hidden>)
 >Re: problem with Entities and inherance (From: HOUNKPONOU Ronald <email@hidden>)
 >Re: problem with Entities and inherance (From: Chuck Hill <email@hidden>)
 >Re: problem with Entities and inherance (From: HOUNKPONOU Ronald <email@hidden>)
 >Re: problem with Entities and inherance (From: HOUNKPONOU Ronald <email@hidden>)

  • Prev by Date: Re: problem with Entities and inherance
  • Next by Date: wotaskd on Yosemite
  • Previous by thread: Re: problem with Entities and inherance
  • Next by thread: wotaskd on Yosemite
  • Index(es):
    • Date
    • Thread