Hello everyone!
I need help.
I have an access log table that stores the user login, date and IP access.
To keep the history even after the user deleted, the log table has no foreign key in the users table. However, they "connect" through the login field, since it does not help much to use the id as history. If a user is deleted, lost the complete data, but I have to login to identify it.
Follows the model:
My problem is to create the relation.
How can I indicate to the Yii which fields will be used in the join clause? I can not simply use the attribute ‘join’, since it is used to include another clause and does not change the main clause.
Thanks!