I have run a few tests and it seems that if a foreign key points to a table that does not have the primary key named ID, the relations code is not generated in the model when using GII.
Is this intended, is there any way around it? In all the lookup tables on a legacy database, the primary key is called LookupID. I cannot change this. I know I can add the relations manually, I am asking about Gii though.