Closed d3artagnan closed 11 years ago
Can we support table prefix in YUM,
for example: private $_tables = array( 'user' => 'user', 'privacySetting' => 'privacysetting', 'translation' => 'translation', 'message' => 'message', 'usergroup' => 'usergroup', 'usergroupMessage' => 'usergroup_message', 'profile' => 'profile', 'profileComment' => 'profile_comment', 'profileVisit' => 'profile_visit', 'profileField' => 'profile_field', 'role' => 'role', 'userRole' => 'user_role', 'membership' => 'membership', 'payment' => 'payment', 'friendship' => 'friendship', 'permission' => 'permission', 'action' => 'action', );
when i use prefix in main config: 'db' => array( 'connectionString' => ... bla bla bla... 'tablePrefix' => 'frn_',
YUM throw exception: The table "profile" for active record class "YumProfile" cannot be found in the database.
fix: I replace 'user' => 'user', 'privacySetting' => 'privacysetting', 'translation' => 'translation', 'message' => 'message', 'usergroup' => 'usergroup', etc To 'user' => '{{user}}', 'privacySetting' => '{{privacysetting}}', 'translation' => '{{translation}}', 'message' => '{{message}}', 'usergroup' => '{{usergroup}}',
This works.
fixed in recent commit, thanks for reporting
Can we support table prefix in YUM,
for example: private $_tables = array( 'user' => 'user', 'privacySetting' => 'privacysetting', 'translation' => 'translation', 'message' => 'message', 'usergroup' => 'usergroup', 'usergroupMessage' => 'usergroup_message', 'profile' => 'profile', 'profileComment' => 'profile_comment', 'profileVisit' => 'profile_visit', 'profileField' => 'profile_field', 'role' => 'role', 'userRole' => 'user_role', 'membership' => 'membership', 'payment' => 'payment', 'friendship' => 'friendship', 'permission' => 'permission', 'action' => 'action', );
when i use prefix in main config: 'db' => array( 'connectionString' => ... bla bla bla... 'tablePrefix' => 'frn_',
YUM throw exception: The table "profile" for active record class "YumProfile" cannot be found in the database.
fix: I replace 'user' => 'user', 'privacySetting' => 'privacysetting', 'translation' => 'translation', 'message' => 'message', 'usergroup' => 'usergroup', etc To 'user' => '{{user}}', 'privacySetting' => '{{privacysetting}}', 'translation' => '{{translation}}', 'message' => '{{message}}', 'usergroup' => '{{usergroup}}',
This works.