• 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: Entity Modeller - Setting Up Many-to-Many Relationships: Link Entities(?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Entity Modeller - Setting Up Many-to-Many Relationships: Link Entities(?)


  • Subject: Re: Entity Modeller - Setting Up Many-to-Many Relationships: Link Entities(?)
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 6 Feb 2009 23:14:13 +1100

Hi Tim,

On 06/02/2009, at 10:26 PM, Tim Kitchener wrote:

<...>would really appreciate it if you could take the time to produce me an idiots'-guide to set this up.

The scenario that I need to model for our current project requires many-to-many relationship between my entities.

The easiest way to achieve this is:
- open the model in WOLips entity modeler
- create Entity A and Entity B with their relative attributes and relationships (except for the relationship to each other)
- select the two entities
- ctl click and select Create Relationship.
- in the wizard that appears have both sides as a toMany. This will auto-create a join entity for you with the relevant relationships from and to each entity.
- generate sql


This will create flattened relationships between the two outer entities by default such that you don't think about the join entity - it's just a db artifact in the background. If, however, you need to store additional information in the join then you simply have a toMany from Entity A to the join, a toMany from Entity B to the join and toOne relationships from the join to A and B. Just untick flatten relationships.

PNG image

PNG image


with regards, --

Lachlan Deck



 _______________________________________________
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: Entity Modeller - Setting Up Many-to-Many Relationships: Link Entities(?)
      • From: Tim Kitchener <email@hidden>
References: 
 >Entity Modeller - Setting Up Many-to-Many Relationships: Link Entities(?) (From: Tim Kitchener <email@hidden>)

  • Prev by Date: Entity Modeller - Setting Up Many-to-Many Relationships: Link Entities(?)
  • Next by Date: Re: Entity Modeller - Setting Up Many-to-Many Relationships: Link Entities(?)
  • Previous by thread: Entity Modeller - Setting Up Many-to-Many Relationships: Link Entities(?)
  • Next by thread: Re: Entity Modeller - Setting Up Many-to-Many Relationships: Link Entities(?)
  • Index(es):
    • Date
    • Thread