• 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: database concept help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: database concept help


  • Subject: Re: database concept help
  • From: Pascal Robert <email@hidden>
  • Date: Wed, 29 Sep 2010 06:47:48 -0400

Le 2010-09-29 à 06:42, Theodore Petrosky a écrit :

> I am altering a project (adding a relation) and I don't understand the "Flatten relationship" option.
>
> this will be a many to many. I just don't understand what flattening does. I started googling and so far the answers don't click.
>
> what's happening in a flattened vs an un-flattened relationship.

Flattened means that the table in the middle (that only holds the keys to join the two other tables) is "hidden" in the EOs, and when you create a new object in one of the two tables, the join table will automatically be populated.

So let's say you have a People and a Job tables, and the join table is People_Job, to add a new job to a person, you do :

  aPerson.setRelationJob(newJob)

No need to do aPerson.setRelationshipPeopleJob(new PeopleJob). _______________________________________________
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: database concept help
      • From: Theodore Petrosky <email@hidden>
References: 
 >database concept help (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: database concept help
  • Next by Date: REST routes in JavaMonitor
  • Previous by thread: database concept help
  • Next by thread: Re: database concept help
  • Index(es):
    • Date
    • Thread