def save(self, advertised_property: AdvertisedProperty): self._last_id = self._last_id + 1 advertised_property.property_id = self._last_id self._repo[self._last_id] = self._property_to_dict(advertised_property)
def save(self, advertised_property: AdvertisedProperty): insert = self.properties.insert().values( **self._property_to_dict(advertised_property), ) result = self.session.execute(insert) advertised_property.property_id = result.inserted_primary_key[0]