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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:58:46+00:00 2026-05-23T08:58:46+00:00

I have a error that I can not get rid of, but the code

  • 0

I have a error that I can not get rid of, but the code works in the same time.

@NamedQuery(name="getDocteur", query="SELECT d FROM Clinique cli, IN (cli.docteurs) AS d WHERE cli.clinique_ID=:clinique_ID AND d.docteur_ID=:docteur_ID")

the Error Eclipse give me is this :

The state field path ‘d.docteur_ID’ cannot be resolved to a valid
type.

I got the same error with this query too

@NamedQuery(name="validUsername", query="SELECT u FROM Clinique cli, IN (cli.users) AS u WHERE cli.clinique_ID=:clinique_ID AND u.username=:username AND u.password=:password")



User.java 
...

@Column(name="PASSWORD", nullable=false)
    @NotNull
    @Size(min=8, max=8)
    private String password;



Docteur.java

package com.jerabi.model;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import java.util.ArrayList;
import java.util.List;


/**
 * The persistent class for the docteur database table.
 * 
 */
@Entity
@Table(name="Docteur",
        uniqueConstraints={@UniqueConstraint(columnNames={"clinique_Clinique_ID", "nom", "prenom"})}
)
public class Docteur implements Serializable {
    private static final long serialVersionUID = 1L;

@Id 
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="DOCTEUR_ID")
private Integer docteur_ID;

@Column(name="Nom", nullable=false)
@NotNull
@Size(min=1, max=40)
private String nom;

@Column(name="Prenom", nullable=false)
@NotNull
@Size(min=1, max=40)
private String prenom;

@ManyToOne(optional=false)
private Clinique clinique;

//bi-directional many-to-one association to Patient
@OneToMany(cascade={CascadeType.PERSIST, CascadeType.MERGE, CascadeType.DETACH}, orphanRemoval=false, mappedBy="docteur")
private List<Patient> patients;

public Docteur() {
    patients = new ArrayList<Patient>();
}

public Integer getDocteur_ID() {
    return this.docteur_ID;
}

public void setDocteur_ID(Integer docteurId) {
    this.docteur_ID = docteurId;
}

public String getNom() {
    return this.nom;
}

public void setNom(String nom) {
    this.nom = nom;
}

public String getPrenom() {
    return this.prenom;
}

public void setPrenom(String prenom) {
    this.prenom = prenom;
}

public List<Patient> getPatients() {
    return this.patients;
}

public void setPatients(List<Patient> patients) {
    this.patients = patients;
}

public Clinique getClinique() {
    return clinique;
}

public void setClinique(Clinique clinique) {
    this.clinique = clinique;
}

}
  • 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-23T08:58:47+00:00Added an answer on May 23, 2026 at 8:58 am

    Try this query,

    SELECT d
    FROM Clinique cli JOIN cli.docteurs d
    WHERE cli.clinique_ID = :clinique_ID
    AND d.docteur_ID = :docteur_ID
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably a dum error that can be fixed in seconds but have
We have an error that we can't seem to find and don't have the
I'm having an sql error that i can't work out. I have to update
I have a really frustrating error that I've spent hours looking at and cannot
I have this error that is keeping me from moving forward. I basically have
I have an odd error that you guys will hopefully be able to help
I have a silly error that I am unable to resolve. I try to
I have a javascript error that occurs on my site, Im pretty sure I
I have a syntax error that I don't know how to fix. This is
I have a WCF error handler that uses the IErrorHandler interface. In the HandleError

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.