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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:28:35+00:00 2026-06-12T07:28:35+00:00

I am trying to create a successful route for an entity that only has

  • 0

I am trying to create a successful route for an entity that only has a composite key so that i may navigate to the default CRUD module’s ‘edit’ interface.

Right now, I am successfully retrieving and displaying the list of all the club_admin’s in the database, however when I try and navigate to the individual editing page of a club_admin, I receive the error of “no route.”

The table in my database is:

create table club_admin  (
    club_id int not null,
    user_username varchar(25) not null,
    primary key (club_id,user_username),
    constraint fk_club_admin_club_id foreign key (club_id) references club(club_id), 
    constraint fk_club_admin_user_username foreign key (user_username) references user(user_username)
);

The code for the club_admin class is:

package models;

...

@Entity
@Table(name="club_admin")
public class ClubAdmin extends GenericModel
{

        @Id 
        @ManyToOne
        @JoinColumn(name="club_id", referencedColumnName="club_id")
        public Club club;

        @Id 
        @ManyToOne
        @JoinColumn(name="user_username", referencedColumnName="user_username")
        public User user;

        public ClubAdmin(Club club, User user)
        {
                this.club=club;
                this.user=user; 
        }

        ...
}

My guess is that the table/entity has no default id to use for the route, and thus fails. So my questions is how do I create a route, that uses the composite keys to navigate to the ‘edit’ page of the club_admin, without having to create a single primary key of type integer?

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-12T07:28:36+00:00Added an answer on June 12, 2026 at 7:28 am

    I found out that many to many relationships are represented by Set<class>. I should not have created the many to many class but instead should have created set of members (which represents an admin) variable on club or visa verse, depending on my needs. With this method, the many-to-many relation is created automatically. Also and there is no need to edit my routes.

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

Sidebar

Related Questions

I am trying to create an example that uses HTTPS. I was successful in
I'm trying to create an OData service that will use authentication & authorization provided
I'm trying to create a custom view, which has a rectangle, and some text
I'm trying to create a form that submits from 1 controller to another. When
I am trying to create a WCF service that is accessible through both webHttpBinding
I am currently trying to create a multi-page form that uses both jQuery and
I am trying to create(successful), insert(problem here) and select(just to check i i am
How can I create a new route/menu in Drupal that doesn't automatically render a
I'm trying to create a pop up box (with jQuery) that can handle forms,
I'm simply trying to create a secure user file that will save basic login

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.