That kind of error is thrown when the Model isn't properly loaded, it tries to execute the method as an SQL function, which obvisouly doesn't exist. At the top of your Controller, check if it has:
App::uses('GamificationBadgeUnlockActionProgression', 'Gamification.Model');
That, combined with the Gamification.GamificationBadgeUnlockActionProgression
in the $uses array that you already have should be enough for it to load. If it still fails, as a last resort you could manually load it in your method using a fallback like:
if (!is_object($this->GamificationBadgeUnlockActionProgression)) {
ClassRegistry::init('Gamification.GamificationBadgeUnlockActionProgression');
$this->GamificationBadgeUnlockActionProgression = new GamificationBadgeUnlockActionProgression();
}
That would manually load the Model and create an instance for it under $this->GamificationBadgeUnlockActionProgression
.
There also appears to be an error in the associations in the model, it should include the Plugin prefixes, like:
public $belongsTo = array(
'GamificationBadgeProgression' => array(
'className' => 'Gamification.GamificationBadgeProgression',
'foreignKey' => 'gamification_badge_progression_id'
),
'GamificationBadgeUnlockAction' => array(
'className' => 'Gamification.GamificationBadgeUnlockAction',
'foreignKey' => 'gamification_badge_unlock_action_id'
)
);