Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6045659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:08:58+00:00 2026-05-23T07:08:58+00:00

I have a Grails application that I am migrating from 1.0.3 to 1.3.7 It

  • 0

I have a Grails application that I am migrating from 1.0.3 to 1.3.7

It was my understanding that tables that used version numbers would start at zero and auto increment on row update. All of the legacy data that I have shows the version cells to be null for each row, but new rows that are entered have a version number of 0.

Did version 1.0.3 of Grails not support this concept? Should I update all of these rows for all appropriate tables to user 0 instead of null? What are the implications? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:08:59+00:00Added an answer on May 23, 2026 at 7:08 am

    Grails has always supported the version column to implement Hibernate’s optimistic locking. When you update an instance Hibernate generates SQL that compares the current and previous version, and will throw an exception if they differ. Since SQL null can never equal anything, any attempt to update those rows will trigger an exception.

    The fix is simple though – just run a query to set null values to 0, something like update table_name set version=0 where version is null.

    Once you’ve done this you should alter those columns to be not-null to avoid null values in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one grails application.In that I have one model class named Book. From
I have an existing grails application that uses spring-security plugin for authentication. I would
In my grails application I have an sql query that selects column data from
I have a grails (2.0) application that needs to get certain information from multiple
I have an example Grails application (from Grails in Action) that was created a
I have a groovy/grails application that needs to serve images It works fine on
I have created one service in my grails application. in that service 25 methods
I have a Vote domain class from my grails application containing properties like article_id
I am maintaining a Grails application that I did not write(I have no experience
I have an application that uses the grails multi-tenant-core plug-in to host multiple versions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.