Clarify whether :touch option is applicable for all updates

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 8.1.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      https://www.mongodb.com/docs/mongoid/master/reference/associations/#touching says:

      > Any belongs_to association can take an optional :touch option which will cause the parent document be touched whenever the child document is touched:

      "touched" is subsequently defined as calling `band.touch`.

      Per our investigation it appears that the parent is touched whenever the child is saved (i.e. modified in any way, not necessarily touched), such that the correct wording would be:

      > Any belongs_to association can take an optional :touch option which will cause the parent document be touched whenever the child document is updated:

      As part of this ticket we should also verify there is test coverage for a non-touch update followed by timestamp check on the parent.

              Assignee:
              Neil Shweky (Inactive)
              Reporter:
              Oleg Pudeyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: