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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:33:38+00:00 2026-06-13T08:33:38+00:00

I have set up a one-to-many relationship in my scaffolded Grails application: class Course

  • 0

I have set up a one-to-many relationship in my scaffolded Grails application:

class Course {
    County county
    Date date
    int maxAttendance

    static hasMany = [ persons:Person ]
}

class Person {
    String firstName
    String lastName
    String email

    Course course

    boolean attended
    boolean paid

    static belongsTo = [ class:Course ]
}

So, when a user views the CourseController, they are able to see Person’s registered in the selected Course.

My question is, how can I change the application so that when a user views the people in a given course, they can also view/modify the checkboxes for ‘boolean attended’ and ‘boolean paid’, which are also in the Person domain? Here is a screenshot:

enter image description here

  • 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-13T08:33:39+00:00Added an answer on June 13, 2026 at 8:33 am

    The thing is that you are using the scaffolded view, so you are pretty much stuck with the default design.

    You can modify the behaviour, by installing and modifying the templates that grails uses to generate those views:

    grails install-templates
    

    This will create the templates in src/templates/scaffolding, although I do not recommend that approach. Maybe it is time that you start developing your own controllers and views, since the scaffolding is there mainly for testing and for administrative use.

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

Sidebar

Related Questions

I have two domains in a Grails application with a one-to-many relationship: Course and
I have a one-to-many relationship and cannot get cascade to work, once I set
I have a User and a set of Authorities in a one-to-many relationship: User.hbm.xml:
I have a One-To-Many relationship set up in core data. I can View/Add/Remove objects
I have a Linq to SQL class. There is a one to many relationship
I have a many-to-one relationship images on my vehicle model. I have set up
my issue lokks similar to this one: (link) but i have one-to-many association: <set
I have a one-to-many relationship between Part and Params (a Part has many Params).
I seem to have major problems getting a one to many relationship to work
I have a Vessel object that has a one-to-many relationship with a VesselDetail object.

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.