diff --git a/rbac/AuthorizerBehavior.php b/rbac/AuthorizerBehavior.php
index <HASH>..<HASH> 100644
--- a/rbac/AuthorizerBehavior.php
+++ b/rbac/AuthorizerBehavior.php
@@ -73,7 +73,7 @@ class AuthorizerBehavior extends Behavior
 
         $schema = $owner->getDb()->getSchema();
         $t = $schema->quoteSimpleTableName('t');
-        $pks = $owner->getTableSchema()->primaryKey;
+        $pks = $owner->primaryKey();
 
         $pkConditions = [];
         $pkParams = [];
fix fetching pk in AuthorizerBehavior