Open mkmoisen opened 2 years ago
And bulk updating of course is important to support. Looping and updating one by one is too slow.
According to the documentation, it will be supported in the future. https://docs.ponyorm.org/working_with_entity_instances.html#updating-an-object
Hi @kozlovsky , is there any work being planned regarding an Update API?
And bulk updating of course is important to support. Looping and updating one by one is too slow.
According to the documentation, it will be supported in the future. https://docs.ponyorm.org/working_with_entity_instances.html#updating-an-object
3 years ago... https://github.com/ponyorm/pony/issues/443
In PonyORM, the only way to perform an update in the database is to first get an object, manipulate it, and commit.
There is currently no way to perform generic updates on a single record without pre-selecting it, or bulk updates on many records.
Does PonyORM plan to support this? SQLAlchemy, Django, Peewee, etc. all support this.
It is often nice to to perform an update without first selecting the object from the database, since it save a round trip to the database, and can additionally verify authorization.
For example, in most ORMs we can do a single update statement and check the authorization in one trip to the DB:
In Pony, this would require two queries:
And bulk updating of course is important to support. Looping and updating one by one is too slow.