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

  • SEARCH
  • Home
  • 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 8557029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:28:57+00:00 2026-06-11T15:28:57+00:00

The domain has 4 columns part of a composite id: id composite: [‘exemptionTermCode’, ‘exemptionCode’,

  • 0

The domain has 4 columns part of a composite id:

id composite: ['exemptionTermCode', 'exemptionCode', 'exemptionClassification', 'exemptionPayType']

In the controller, a ugly parody of a REST service, I have this code:

else if (request.method == "PUT" && params.rowid) {
  def a = WaiverExemption.find("from WaiverExemption as e where e.exemptionRowId = ?", [params.rowid])
  if (params.exemptionPay) a.exemptionPayType = params.exemptionPay
  if (params.exemptionClassification) a.exemptionClassification = params.exemptionClassification
  if (params.exemptionCode) a.exemptionCode = params.exemptionCode
  if (params.exemptionPriority) a.exemptionPriority = parseLong(params.exemptionPriority)
  if (params.exemptionTempFlag) a.exemptionTempFlag = params.exemptionTempFlag
  a.exemptionUserId = session.licensePlate
  a.save(flush: true, failOnError: true)

I don’t get any errors on the console. I can step through, and see the model object in the watch window, and I see the correct property updated. After the save() finishes, I see in the model.errors the following:

grails.validation.ValidationErrors: 0 errors

No exceptions. No crashing the debugger. Nada. Subsequent commands are all executed. However, on the Oracle side of things, the record that was updated definitely remains un-updated. It’s taken me awhile (didn’t know about .errors until yesterday) to get this far, and I can do inserts and deletes with the gorm methods. I can’t understand why save() is failing, I’m not getting validation issues like I have in the past. I’m not updating fields in such a way that I’d have a non-unique pk, and I’d expect that to throw an error if I did.

Is there something I’m missing here?

I am using the rowid to search for the record because by the time I’ve updated this, I’ve lost part of the pk with which to look it up. Rowid is set to updateable false.

[edit]
I’ve also tried doing a.refresh() after the save. This fails, it’s unable to find a record with that key (which you’d expect, since it didn’t actually run the update query.

  • 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-06-11T15:28:58+00:00Added an answer on June 11, 2026 at 3:28 pm

    I’m afraid you will have to remove the old instance and create a new one if you change a field that is part of the composite id. That’s how I’ve solved the problem earlier.

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

Sidebar

Related Questions

My domain object has 20 properties(columns, attributes, whatever you call it) and simple relationships.
I've just finished moving a Wordpress site to a new server. The domain has
I have 10 top-level domains e.g. example1.com, example2.com, example3.com, etc, and each domain has
I have a domain object that has been auto generated for me by MyGeneration.
My client old webpage has www.domain.com/client/default.asp?wa_id=558&wa_object_id=1&wa_id_key=25092d5959fd9f212d5c0f63a5f0efb2 kind of URLs. Now we have installed a
I have an ntier solution which has a Domain project for my POCO classes.
A client has given me a spreadsheet of hundreds of domain names. My task
I have a url which has some get variables in it like: domain.com/recover?email=my@email.com&token=abc123 inside
I see the Nginx HttpRewriteModule documentation has an example to rewrite a www-prefixed domain
Is there a way to gather all links that has a specific domain in

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.