File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes [JPA] EJBQL query returns replicated result of same record Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[JPA] EJBQL query returns replicated result of same record" Watch "[JPA] EJBQL query returns replicated result of same record" New topic
Author

[JPA] EJBQL query returns replicated result of same record

antonio each
Greenhorn

Joined: Apr 05, 2011
Posts: 9
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

Joined: May 16, 2005
Posts: 513

Why are you not using carTypeId as a join condition?


If you are not laughing at yourself, then you just didn't get the joke.
James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
What is the SQL generated?


TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [JPA] EJBQL query returns replicated result of same record
 
Similar Threads
Abstract class example
Loop Problems
[JPQL] UNION
Retrieving "DiscriminatorColumn" value when querying an object
Hibernate: Can someone verify my mapping configuration?