MongoDB Plugin
  1. MongoDB Plugin
  2. GPMONGODB-65

Versions on hasMany objects being increased causes optimistic locking exception in transaction

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.M6
    • Fix Version/s: 1.0.0.M7
    • Labels:
      None
    • Environment:
      Mac OSX, Grails 1.3.7, Java 6

      Description

      If a domain object is updated and that domain class has a hasMany with references to other domain classes, then those domain objects are also updated (last updated and version). This becomes an issue inside of a withTransaction block when those hasMany objects are used and not expected to be updated. An OptimisticLockingException is thrown. We can get around this by using lists of IDs instead of domain classes in the hasMany.

        Activity

        Show
        Burt Beckwith added a comment - Fixed by https://github.com/SpringSource/spring-data-mapping/commit/a8e4f710e6b10452d76780bdaf5f3a02e82a0db2
        Hide
        Sara added a comment -

        Hi Burt,

        The above link doesn't work. Can you pls update the same?

        Show
        Sara added a comment - Hi Burt, The above link doesn't work. Can you pls update the same?

          People

          • Assignee:
            Burt Beckwith
            Reporter:
            Dan Polites
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: