• 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: Why no 1to1 relationships?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why no 1to1 relationships?


  • Subject: Re: Why no 1to1 relationships?
  • From: Jacky Gagnon <email@hidden>
  • Date: Wed, 2 Apr 2008 13:48:00 -0400

Hi Jeff,

I've decided to fully EOize my app to replace my current use of flat files, mainly to better deal with concurrency issues. In creating my analogous tables, I found that there's no way to specify a "1 to 1" relationship between tables using the Entity Modeler tool. Is there a specific reason for this? Or is it just figured that you might as well make it one to many anyway even if it is just one to one?


You can specify «1 to 1» relationship with Entity Modeler.

If the destination cannot be null, use the same id in the two tables.
-In Properties > Basic select : the cardinality «To One», your destination, and add your primary keys.
-In Properties > Advanced select : for the source object, check Propagates primary key and Owns Destination (if the destination object cannot exist without an owner).


Good luck!

Jacky

If you're wondering why I want to do this, it's to hopefully reduce conflicts of multiple people updating the same record in a table. Is that generally a good reason to split 1 to 1 data into two tables?

Thanks,
Jeff
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40druide.com


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: Why no 1to1 relationships?
      • From: Robert Walker <email@hidden>
References: 
 >Why no 1to1 relationships? (From: Jeff Schmitz <email@hidden>)

  • Prev by Date: Re: Locking Session.defaultEditingContext() Question
  • Next by Date: Re: an interesting lockRowComparingAttributes:
  • Previous by thread: Re: Why no 1to1 relationships?
  • Next by thread: Re: Why no 1to1 relationships?
  • Index(es):
    • Date
    • Thread