Grails JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile
Grails
  • Grails
  • GRAILS-3396 Top level task: GORM Improvements
  • GRAILS-2999

GORM to support dynamic-update="true"

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Closed 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

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Git Commits
Hide
Permalink
Graeme Rocher added a comment - 28/Oct/08 7:56 AM

Can be done now with:

static mapping = {
     dynamicUpdate true
     dynamicInsert true
}
Show
Graeme Rocher added a comment - 28/Oct/08 7:56 AM Can be done now with: static mapping = { dynamicUpdate true dynamicInsert true }

People

  • Assignee:
    Graeme Rocher
    Reporter:
    Dustin Whitney
Vote (0)
Watch (0)

Dates

  • Created:
    23/May/08 2:38 PM
    Updated:
    28/Oct/08 7:56 AM
    Resolved:
    28/Oct/08 7:56 AM

Agile

  • View on Board
  • Atlassian JIRA (v5.2.1#813-sha1:277a546)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Grails project. Try JIRA - bug tracking software for your team.