SA 0.3 Updates blank string with blank string

Issue #354 resolved
Former user created an issue

I've noticed that SA tries to be smart and not update columns that have been set to the same value they already have from the database. However this seems to break with blank (empty) strings. If I have a field that has an empy string ('') in the database, retrieve it using a mapped object and set that same fields to blank (''), SA generates an update statement on session.flush().

Not terribly important, but just generates more UPDATEs than it ought to.

Using SA 0.3 and pymssql on Windows.

Comments (3)

  1. Mike Bayer repo owner

    changeset:2141 introduces a very simple unit test to test this issue. it doesnt reproduce. if you are still having this problem, please attach a test case, preferably using the database url 'sqlite://', that illustrates the problem.

  2. Log in to comment