With the following code: ``` php class Car extends ActiveRecord\Model { static $belongs_to = array( array("alarm", "foreign_key" => "slug", "primary_key" => "slug") ); } var_dump(Car::find($id)->alarm); ``` The generated query will be ``` sql SELECT * FROM `alarms` WHERE `id`='something' LIMIT 0,1 ``` when it should be ``` sql SELECT * FROM `alarms` WHERE `slug`='something' LIMIT 0,1 ```