The write method called self.stage_id which caused singleton error when self contains more than one record