• 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: Owns destination and other relationship constraints ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Owns destination and other relationship constraints ...


  • Subject: Re: Owns destination and other relationship constraints ...
  • From: Alexander Spohr <email@hidden>
  • Date: Wed, 14 Apr 2004 10:32:37 +0200

Am 14.04.2004 um 09:35 schrieb Ashley Aitken:

Howdy All,

My understanding of relationships that own their related objects in EOF is that objects are (automatically) deleted (in Java and, as a result of EOF, from the database) when they are removed from a relationship.

Two questions:

1. How does one move an object from one aggregate to another? Does it just work, to remove it from one aggregate and add it to another, for example, in code, or will this cause a problem.

no problems here. the deletion will occur in saveChanges, not earlier. if you hang it into a new relationship it will not be deleted.


2. If you have a relationship set as "owns destination" *must* the reverse relationship be mandatory and cascade or deny delete? Optional and nullify or no-action sound problematic.

cascade could cause a problem :) think about it...
mandatory means that eof has to create a target object if you don't deliver one. not necessary here.
deny should not work either. that will prevent eof from deleting the "owned" object.


so just do nothing of it at the inverse relationship.

	atze
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Owns destination and other relationship constraints ...
      • From: Ashley Aitken <email@hidden>
    • Re: Owns destination and other relationship constraints ...
      • From: Ashley Aitken <email@hidden>
References: 
 >Owns destination and other relationship constraints ... (From: Ashley Aitken <email@hidden>)

  • Prev by Date: Owns destination and other relationship constraints ...
  • Next by Date: 1 WO on 2 Computers
  • Previous by thread: Owns destination and other relationship constraints ...
  • Next by thread: Re: Owns destination and other relationship constraints ...
  • Index(es):
    • Date
    • Thread