How does State belongTo City? Isn't it the other way around? Same with
Country.

On my region based apps I use the following

Zone hasMany Country, State, Region, City
Country hasMany  State, Region, City
State hasMany Region, City
Region hasMany City

Country belongsTo Zone
State belongsTo Zone, Country
Region belongsTo Zone, Country, State
City belongsTo Zone, Country, State, Region

Zone is North America, South America, Asia, Etc

On Aug 18, 5:17 pm, DerBjörn <[email protected]> wrote:
> Thanks, Dan!
>
> After I rebaked my models with following relations:
>
> City belongsTo State
>
> State belongsTo Country
> State belongsTo City
> State hasMany City
>
> Country belongsTo City
> Country hasMany State
>
> and updated my views, finally i got a "result"...
> Your advice with "containable" i haven't follow till now.
>
> I still have one problem that maybe i am able to solve with cricket's
> advice of using virtual models!?!
> When i want to add p.e. a new country or a new state, their comboboxes
> for capital city are empty, so i cannot choose its capital city. How
> do I solve this problem?
> Thanks a lot :)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to