This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[JPA] EJBQL query returns replicated result of same record

 
antonio each
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

this is my scenario:



So i have a NamedQuery on top of Car entity:




In my database I have only one car which have CAR_DESC = 'MONOVOLUME',but query return the same replicated result sixteen times!

I can't see any error in my code,can someone help me?

Thank you!
Antonio
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you not using carTypeId as a join condition?
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the SQL generated?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic