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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:04:01+00:00 2026-05-23T22:04:01+00:00

I am trying to add data to a database, in grails but get this

  • 0

I am trying to add data to a database, in grails but get this error:

Error 500: Executing action [getData] of controller [mgr.CollectDataEntryController] caused exception: groovy.lang.MissingMethodException: No signature of method: static groovy.lang.MissingMethodException.addToAlumConnectionEducations() is applicable for argument types: (mgr.AlumConnectionEducations) values: [mgr.AlumConnectionEducations : null]

where CollectDataEntryController is the controller doing the work. here is the code snippet from that controller:

saveNewAlum.addToAlumConnectionEducations(new AlumConnectionEducations(alumConnectionsId:connectionId, degree:alumConnectionEduDegree,endDate:alumConnectionEduEndDate,fieldOfStdudy:alumConnectionEduFieldOfStudy,schoolName:alumConnectionEduSchoolName,startDate:alumConnectionEduStartDate))

the domain, AlumConnectionEducations , belongs to a one to many relationship with another domain, AlumConnections, which in turn belongs to a one-to-many relationship with to another domain, alumProfile

to, in my code I first add the domain AlumConnection, which works fine but when i then try to add AlumConnectionEducations i get the above error. anyone have any idea of what i am doing wrong?

thanks
jason

    package mgr
    import java.util.Date;
    class AlumConnections  {
String linkedinId
String firstName
String lastName
String headline
String locationName
String locationCode
String industry
    Date dateCreated
Date lastUpdated
long version
static belongsTo = [alumProfile:AlumProfile]
static hasMany = [  
alumConnectionEducations    :   AlumConnectionEducations
 ]
static mapping = {
    cache true

    columns {       
        linkedinId      type:'text'
        firstName       type:'text'
        lastName        type:'text'
        headline        type:'text'
        locationName    type:'text'
        locationCode    type:'text'
        industry        type:'text'

    }
}
static constraints = {  
    linkedinId      (nullable:false, blank:false)
    firstName       (nullable:true)
    lastName        (nullable:true)
    headline        (nullable:true)
    locationName    (nullable:true)
    locationCode    (nullable:true)
    industry        (nullable:true)

}
  }         

in the controller that calls the domains:

  def saveNewAlum = ""
  saveNewAlum = new AlumProfile(firstName:linkedinFirstName, lastName:linkedinLastName, dob:newDate,industry:linkedinIndustry, oAuthToken:oAuthtoken, secretKey:secretKey)

  saveNewAlum.addToAlumConnections(new   AlumConnections(linkedinId:connectionId,firstName:connectionFName, lastName:connectionLName, headline:connectionHeadline, locationName:connectionLocationname, locationCode:connectionLocationCode,industry:connectionIndustry))

The above code works fine and saves to the MySQL database. its only when i try to create saveNewAlum.addToAlumConnectionEducations that i get the error

  • 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-23T22:04:03+00:00Added an answer on May 23, 2026 at 10:04 pm

    well, it took all day but i got it. so, my assumption seemed to be right, it was the one-to-many with a one-to-many that was causing the problem. here’s how i fixed it. The domains were right the way i had it. in the controller:
    first, i create the main parent:

             saveNewAlum=new AlumProfile(firstName:linkedinFirstName, lastName:linkedinLastName, dob:newDate, industry:linkedinIndustry, oAuthToken:oAuthtoken, secretKey:secretKey)
    

    then, i create the object to be added to the child:

         myConnection= new AlumConnections(linkedinId:connectionId,firstName:connectionFName,lastName:connectionLName,headline:connectionHeadline,locationName:connectionLocationname, locationCode:connectionLocationCode,industry:connectionIndustry)
    

    then, i save the child to the parent:

        saveNewAlum.addToAlumConnections(myConnection)
    

    then, i create the object to save to the child’s child:

      newConnectionEdu=  new AlumConnectionEducations(
                  degree:alumConnectionEduDegree,
                  endDate:alumConnectionEduEndDate,
                  fieldOfStudy:alumConnectionEduFieldOfStudy,
                  schoolName:alumConnectionEduSchoolName,
                  startDate:alumConnectionEduStartDate)
    

    then, finally, i add the child to the child:

     myConnection.addToAlumConnectionEducations(newConnectionEdu)
    

    and that is how you add a child to a child!

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

Sidebar

Related Questions

I am just trying to add data to the database and retrieve it. This
I'm trying to add some simple user data into a database via a webpage
I am trying to add data to a sql database by entering info in
I am trying to get some data stored in a database that i can
I am trying to add data to a newly created column... DataSet ds =
I'm trying add a tab to my web page that looks like this: Using
Trying to add an onclick handler to my tabs, and can't seem to get
I'm trying to add support for stackoverflow feeds in my rss reader but SelectNodes
I am trying to add data from a dataset to an access table(.mdb). I
What I am trying to do is to add data for a product into

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.