I think capital is a city attribute there for should be a column in
the cities table.
The values of the column can be 0 = not a capital, 1= state capital, 2
= country capital, 4 = state and country capital.
It also solve the empty combobox.
Another way to solve the empty combobox is to add "N/A" row to the
cities table and select this value before adding cities.
One more issue, country may have no states at all.

On Aug 19, 12:17 am, DerBjörn <b.unkh...@googlemail.com> wrote:
> Thanks, Dan!
>
> After I rebaked my models with followingrelations:
>
> 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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to