Gii - Relations When Primary Key Not Named Id

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.

Mmmmmm … ok, I dont think the issue is as initially described. For some reason the relation is not being generated, and everything seems properly defined. Anyone had any experience with such an issue?