On Sep 27, 2012, at 8:29 PM, sergio_101 wrote:

> i just want to make sure that i am thinking about this the
> seaside/smalltalk way..
> 
> i would like to build a 'has and belongs to many' relation where i can
> drill down on my data from either side.
> 
> say i have a movie, and a theater. a movie can be shown in many
> theaters, and a theater can show many movies.
> 
> i would want to be able to ask a theater what movies it's showing, or
> a movie which theaters it is showing in.
> 
> my initial thought would be to create a 'showing' model, where  it
> would have a movie and a theater attached.. then i could query showing
> for either movie or theater..

I would say that it depend is the showing is an important part of your domain.
Else you can either have dictionaries or collections on both movie and theater.

> 
> or, i could have a theaters Collection on movies and a movies
> Collection on on theaters, and contain that information in only two
> models..
> 
> any suggestions?
> 
> thanks!
> 
> -- 
> ----
> peace,
> sergio
> photographer, journalist, visionary
> 
> http://www.ThoseOptimizeGuys.com
> http://www.CodingForHire.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
> 


Reply via email to