public static function createOrUpdate(MongoId $studentId, array $profileData) { $profile = new StudentProfile($studentId, $profileData); StudentModel::setProfile($studentId, $profile->getData()); }