public static function createOrUpdate(MongoId $studentId, array $profileData) { $profile = new StudentProfile($studentId, $profileData); StudentModel::setProfile($studentId, $profile->getData()); }
public static function submitWithStudentProfile(MongoId $applicationId, StudentProfile $studentProfile) { $update = (new DBUpdateQuery(self::$collection))->queryForId($applicationId)->toUpdate('submitted', true)->toUpdate('profile', $studentProfile->getData()); $update->run(); }