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 8842497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:58:24+00:00 2026-06-14T10:58:24+00:00

I am new to grails and I have an app with this simple classes:

  • 0

I am new to grails and I have an app with this simple classes:

class Person{
String name
}

class Voter{
String voteAddress
String counter
Person person
}

Now, I am trying to update the field person only of the Voter class. Now I have code below and it is not working and I know it is wrong but I tried it anyway:

def updatePersonFieldOnly{
 def voterInstance = Voter.get(params.id)
 voterInstance.properties=params

 def personInstance = Voter.findById(12)

 voterInstance.person = personInstance

 ......some other code to update
 .....
}

Now, when the action executes, I got this error:

Failed to convert property value of type java.lang.String to required type proj.Person for property person; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [proj.Person] for property person: no matching editors or conversion strategy found

I am still on my way on reading the docs of grails. So can anyone help me about this? 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-06-14T10:58:25+00:00Added an answer on June 14, 2026 at 10:58 am

    It looks like you have a property called “person” in the params map that Grails is trying to convert to the “Person” object. Try changing that field to “person.id” and Grails should automatically fetch the Person object corresponding to that id and match it to the “person” object.

    Refer to DataBinding under the section “Data binding and Single-ended Associations” for more information.

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

Sidebar

Related Questions

I'm coming from a Spring MVC background on a new Grails app. I have
I have this domain model, grails-app/domain , named com.portal.Schedule.groovy having this properties: Subject subject
I have a simple grails file upload app. I am using transferTo to save
I'm new to grails, but have previous experience using .net with c# and linq
I have a project which uses groovy 1.7.5 and grails 1.3.4. but my new
I create a new grails app and do grails install-plugin rest . App builds.
Im building a Grails app that will have multiple similar websites (each it's own
I have installed the grails web plugin . I can now browse to :
I have a Groovy/Grails web app that reads e-mails from Gmail. It gets messages
Background: we have a Grails 1.3.7 app and are using Liquibase to manage our

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.