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

  • Home
  • SEARCH
  • 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 4250264
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:30:21+00:00 2026-05-21T04:30:21+00:00

software <-m:n-> tag I want to create query for selecting all softwares where tag.id

  • 0

software <-m:n-> tag

I want to create query for selecting all softwares where tag.id = id

I write:

TypedQuery query =
              Software.em().createQuery(
               "SELECT DISTINCT s FROM Software s INNER JOIN s.tags WHERE s.tags.id = :tagId",
               Software.class
              );
              query.setParameter("tagId", tagId);

as result i have:

A java.lang.IllegalArgumentException
has been caught,
org.hibernate.QueryException: illegal
attempt to dereference collection
[software0_.id.tags] with element
property reference [id] [SELECT
DISTINCT s FROM models.Software s
INNER JOIN s.tags WHERE s.tags.id =
:tagId]

How could I implement it? and why I have such exception?

  • 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-21T04:30:22+00:00Added an answer on May 21, 2026 at 4:30 am

    I think the problem might be that you are missing the FROM clause in your statement.
    The error “Unexpected token: INNER” is given because it expects a FROM.

    Try the following query:

    SELECT DISTINCT s FROM Software s INNER JOIN s.tags t WHERE t.id = :tagId
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have software<-m:n->tag where software is main part of the relationship (tag has mappedby=softwares
I have many-to-many for tag <-> software , when i delete tag i want
I want to compose application build version that is automatically derived from the Git
My team uses SVN for our software platform, and we create tags periodically to
I wrote a regex in Rad Soft to pull out a div tag from
JavaScript goes here.. and i have many sections of div tag.. i want to
I tried to create a video tag in ASP.NET 4 in MVS 2010 but
We're currently implementing a little tag system into our software. There are just two
The software my company uses has a web service which signature is more or
Given software where ... The system consists of a few subsystems Each subsystem consists

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.