Wednesday, January 18, 2012

Trouble Linking Models

I'm trying to link a few models together, but I'm having difficulty in linking the second level of model in.

For example, say I have a Band which has many Members, many Gigs and many Records. This can be easily represented in the Band model as:

var $hasMany = array('Members', 'Gigs', 'Records');

Everything links fine given the correct field names, but then how do I link another model to Members, Gigs, or Records? Say each Record has one cover Image.. I'm not sure how to define / represent it.

Thanks!

Clint

No comments: