Make sure class id is inserted to db on create