CakePHP: Cake Bake HasOne association -


i use following db setup:

users:

  • id
  • name
  • country_id (fk)

countries

  • id
  • name

i use setup data integrity. when user adds account, country dropdown presented in add form through find(list).

the problem while cake baking, can not choose hasone relationship between users , countries. can choose user belongsto country.

what goes wrong here? need add hasone association manually or belongsto relationship correct?

thanks

i assume mean hasmany, in country has many users. yes, you'll have define in country model, if wish have relationship.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -