• 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: To-one relationship with propagating primary key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: To-one relationship with propagating primary key


  • Subject: Re: To-one relationship with propagating primary key
  • From: Johann Werner <email@hidden>
  • Date: Sun, 13 Jan 2019 13:02:12 +0100

Hi Ricardo,

when using pk propagation I vaguely remember that EOF is automatically creating
an instance of the dependent entity. Thus when you create a second object B and
set the relationship to A the auto created object is left without connection.

jw

> Am 13.01.2019 um 12:44 schrieb Ricardo Parada <email@hidden>:
>
> Hi all,
>
> I have an entity A with a to-one relationship to entity B.
>
> The relationship is setup in eomodeler to propagate it’s primary key from A
> to B.
>
> I then create A and B, insert into editing context and set the to-one
> relationship in A to point to B. When I save changes EOF is trying to insert
> TWO instances of B. The second instance of B has NULL in all its properties:
>
> INSERT INTO HOSTING_COMPANY(CUSTOMER_ID, name) VALUES (?, ?)" withBindings:
> 1:20462(customerID), 2:"test"(name)>
>
> INSERT INTO HOSTING_COMPANY(CUSTOMER_ID, name) VALUES (NULL, NULL)
>
>
> Is this a know bug? I am using a very old version of Wonder.
>
> The relationship is also set up to own the destination and Cascade on Delete.
>
> Thanks in advance for any help.
>
> Ricardo
> _______________________________________________
> 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

 _______________________________________________
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: To-one relationship with propagating primary key
      • From: Ricardo Parada <email@hidden>
References: 
 >To-one relationship with propagating primary key (From: Ricardo Parada <email@hidden>)

  • Prev by Date: To-one relationship with propagating primary key
  • Next by Date: Re: To-one relationship with propagating primary key
  • Previous by thread: To-one relationship with propagating primary key
  • Next by thread: Re: To-one relationship with propagating primary key
  • Index(es):
    • Date
    • Thread