I want to run a django update through the ORM that looks something like this:
What's happening is that Django is passing the '+' through to SQL - but SQL doesn't allow the use of '+' for concatenation, so it tries to add numerically. If you use an integer in place of 'a string', it does work in the sense that it adds the integer value of
my_other_field to your variable.
It's debatable whether this is a bug. The documentation for
F() objects in lookup queries states:
Django supports the use of addition, subtraction, multiplication, division and modulo arithmetic with
so it could be argued that you shouldn't be trying to use it to update with strings. But that's certainly not documented, and the error message 'Incorrect DOUBLE value' is not very helpful. I'll open a ticket.