model.update() should not update columns with a default value that hasn't changed

Description

If we try to instanciate a new model to update a single column, it will also update (and possibly override) all columns with a default value defined. (collections included)

The ValueManager should handle default values properly (previous_value should not be None I think).

Environment

None

Pull Requests

None

Activity

Show:
Jim Witschey
March 28, 2017, 2:56 AM
Edited

The PR looks good, but I tried to add a test for the issue described and could not reproduce it. could you have a look? It'd be good to have a test for the reported issue in addition to the underlying previous_value behavior, and I can't get one to work.

https://github.com/datastax/python-driver/compare/master...mambocab:attempt-657-repro

Jim Witschey
March 28, 2017, 4:57 AM

With some help from Alan, I've fixed the test. If the integration tests run clean, and if it looks good to you, feel free to merge.

Jaume Marhuenda
April 5, 2017, 11:56 PM

Added some tests here.

Fixed

Assignee

Unassigned

Reporter

Alan Boudreault

Fix versions

Labels

PM Priority

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Pull Request

None

Sprint

Py P-ENG-TRIAGE

Affects versions

Priority

Minor