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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:11:59+00:00 2026-06-10T02:11:59+00:00

In grails I am trying to get every instance of a domain called Child

  • 0

In grails I am trying to get every instance of a domain called Child to be printed out for that authorized user.

I am using the following:

 <g:each var="child" in="${Child}">
    <p>Name: ${child.firstname}</p>
    <p>Surname: ${child.lastname}</p>
 </g:each>

Each user can have several children (Child) and I want it to list the children for the currently logged in user.
I am using spring source security core plugin for my login etc.

This is my exception:

Class : groovy.lang.MissingPropertyException Message : No such
property: firstname for class: com.fyp.timeline.Child Possible
solutions: firstname, lastname

Any ideas?

  • 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-10T02:12:01+00:00Added an answer on June 10, 2026 at 2:12 am
    <g:each var="child" in="${user.children}">
       <p>Name: ${child.firstname}</p>
       <p>Surname: ${child.lastname}</p>
    </g:each>
    

    user is an instance of logged in user where

    User{
        static hasMany=[children:Child]
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get every instance of a domain where there user is
I am trying to query a database within grails using: def per = User.get(springSecurityService.principal.id)
I am trying to list the grails plugins but i get the following output:
Using mongodb in grails i am trying to get a hold of the database
I'm trying to get a one-to-many relationship working with grails/gorm. I don't understand how
I'm trying to get request params passed by PUT request, at Grails-based app. I'm
I'm having a hard time trying to get hasMany to work in Grails 2.0.1
I have been trying for 4 days to get app-engine and grails working together
I've been trying to get a signature panel to work in grails. on the
I'm trying to learn about grails with Google App Engine and JPA by following

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.