Assigning SQL expression to a version column.

13 views
Skip to first unread message

Jeff Horemans

unread,
Dec 4, 2019, 3:02:33 AM12/4/19
to sqlalchemy
What is the expected behavior of assigning an SQL expression to a version column?
Before migrating from version 1.2.4. to 1.3.3. the priority was given to the assigned expression, afterwards it seems to be the other way around.
I think there is something to say about both, but I wanted to check if this change was purposely done and what the reasoning is going forward.
Thanks in advance.




Mike Bayer

unread,
Dec 4, 2019, 9:35:57 AM12/4/19
to noreply-spamdigest via sqlalchemy
There is no test coverage and as far as I can see at the moment no documentation for such a use case as of yet, and per the documentation at https://docs.sqlalchemy.org/en/13/orm/versioning.html?highlight=versioning#programmatic-or-conditional-version-counters, unless I am missing something, programmatic assignment of the version id is only valid when the generator is False, that is, there is no defined or supported behavior in SQLAlchemy for the case where an automatic version counter is configured and the application may sporadically assign an explicit vresion counter with the purpose of overriding that value.

I'm only going by your verbal description however so if we are to create a behavioral definition here this would usually happen via github issues that illustrate a complete MCVE [1]








--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
 
 
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages