Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1-beta1
    • Component/s: Persistence
    • Labels:
      None

      Description

      It would be nice if GORM supported Hibernate's dynamic-update="true", here is an exmple hibernate mapping

      <class name="CommonProfile" table="common_profile" dynamic-update="true">

      dynamic-update="true" makes update queries only update fields that have been changed on domain objects. An example of why this would be nice is that I'm using a custom UserType to hash my passwords, but every time I update my user objects, the password gets re-hashed, so it is ever changing. Dynamic-update would solve that, because I wouldn't be altering the password field unless I wanted it changed.

        Activity

        Hide
        Graeme Rocher added a comment -

        Can be done now with:

        static mapping = {
             dynamicUpdate true
             dynamicInsert true
        }
        
        Show
        Graeme Rocher added a comment - Can be done now with: static mapping = { dynamicUpdate true dynamicInsert true }

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Dustin Whitney
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development