#33647: bulk_update silently truncating values for size limited fields
-------------------------------------+-------------------------------------
Reporter: jerch | Owner: Akash
| Kumar Sen
Type: Bug | Status: assigned
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Akash Kumar Sen):
I don't think we are regressing the `Cast()` here the query generated is
{{{
UPDATE "queries_article" SET "name" = (CASE WHEN ("queries_article"."id" =
1) THEN bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb WHEN
("queries_article"."id" = 2) THEN
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ELSE NULL END)::varchar
WHERE "queries_article"."id" IN (1, 2)
}}}
it is just generating the super type i.e. `varchar` instead of
`varchar(20)` in case of a `CharField`
If you can explain a little further that would be great @felixxm
--
Ticket URL: <https://code.djangoproject.com/ticket/33647#comment:19>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018b2f4cafc7-eb60d428-f056-4385-8c83-066b532ccf45-000000%40eu-central-1.amazonses.com.