Define a HAS_ONE relation (Gii)

Hi All

I just created two tables, with one having a foreign key to the other. When Gii generates a Model for the one without the foreign key, I get a HAS_MANY relationship

What do I need to change to get a HAS_ONE relationship ? Ca Gii do this ?


just change HAS_MANY to HAS_ONE,that’s it

of course :) I was just wondering if it was possible with some database foreign keys or something!