Move isOwnedBy method into AppModel.php