#36876: Model timestamp fields get different values using auto_now
-------------------------------------+-------------------------------------
     Reporter:  Thomas Drevon        |                    Owner:  (none)
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  5.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  auto_now             |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

 * keywords:   => auto_now
 * resolution:   => invalid
 * status:  new => closed

Comment:

 Hi, thanks for the report.

 > This is, in my opinion, a bug. Because create happens (I presume) in a
 single transaction.

 Nothing in the docs yokes this feature to transaction timestamps. If you
 need transaction timestamps, `contrib.postgres` ships a `TransactionNow`
 expression.

 There's also an accepted ticket to remove this feature entirely (#22995),
 so implementing model logic for this might be wise anyway.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36876#comment:2>
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 visit 
https://groups.google.com/d/msgid/django-updates/0107019be87d5fd4-b8d0fab9-87af-45bf-86e4-9cf9e0070f77-000000%40eu-central-1.amazonses.com.

Reply via email to