Creating Models With Relations In Backend Folder


I have been trying to create front-end/back-end structure using

I have now 2 files, index.php that points to front end and iadmin.php that points to backend.

If I use index.php to create a model in gii, it works correctly but if I use iadmin.php to create models, it does not create relationships array.

Has any one come across something like this?