• 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: assigning relationship in willInsert()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: assigning relationship in willInsert()


  • Subject: Re: assigning relationship in willInsert()
  • From: Ramsey Gurley <email@hidden>
  • Date: Thu, 12 Feb 2015 10:15:02 -0700

On Feb 11, 2015, at 10:46 PM, Theodore Petrosky <email@hidden> wrote:

> But there are rules about these books. There are 15 persons assigned to the Reed1 book for Show01.  Only one of them is the PrimaryPlayer. Likewise there are 20 other books assigned to this Show.

How do you know who is the primary if you have 15 people assigned to the book? Enforce that in the model.

Event
->>eventBooks
->primaryEventBook

Now an event can only have one primary. Note, this creates a circular relationship. Your database has to be able to do deferred constraints. Pick a good one.

Notice that now you have created this relationship, your problem is solved. You can have a wizard interface

([tab1], show, date, [tab2], eventBooks, [tab3], primaryEventBook)

You select a show and date. When you go to the next page, you can auto populate your event books relationship with persons based on PersonShow. When you go to the next page, you can have the user select one of your existing EventBooks filtered by isPrimaryPlayer from PersonBook. If there’s only one, then it is automatically assigned. If there are none, then you auto populate a new event book with a null person.

Problem solved with no magic going on behind the user’s back :)
 _______________________________________________
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: assigning relationship in willInsert()
      • From: Theodore Petrosky <email@hidden>
    • Re: assigning relationship in willInsert()
      • From: Ramsey Gurley <email@hidden>
References: 
 >assigning relationship in willInsert() (From: Theodore Petrosky <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Theodore Petrosky <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Chuck Hill <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Theodore Petrosky <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Chuck Hill <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Timothy Worman <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Theodore Petrosky <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Chuck Hill <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Ramsey Gurley <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Theodore Petrosky <email@hidden>)
 >Re: assigning relationship in willInsert() (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: assigning relationship in willInsert()
  • Next by Date: Re: assigning relationship in willInsert()
  • Previous by thread: Re: assigning relationship in willInsert()
  • Next by thread: Re: assigning relationship in willInsert()
  • Index(es):
    • Date
    • Thread