Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

How compare the same entity in JPQL ?

Thread view: 
marek - 10 Mar 2008 13:27 GMT
I've got some entity and I want to compare values from the same one in JPQL.
For example: SELECT i1 FROM Items i1, Items i2 WHERE i1.data = ?1 AND
i2.data = ?2, it works, but I need null values too, so I must use JOIN
(OUTER JOIN).
Items entity doesn't have references to itself.
My question's how can I use JOIN i this JPQL statement ?
Tris Orendorff - 12 Mar 2008 02:32 GMT
> I've got some entity and I want to compare values from the same one in JPQL.
> For example: SELECT i1 FROM Items i1, Items i2 WHERE i1.data = ?1 AND
> i2.data = ?2, it works, but I need null values too, so I must use JOIN
> (OUTER JOIN).
> Items entity doesn't have references to itself.
> My question's how can I use JOIN i this JPQL statement ?

This should help: http://e-docs.bea.com/kodo/docs41/full/html/ejb3_langref.html#ejb3_langref_Joins

Signature

Tris Orendorff
[ Anyone naming their child should spend a few minutes checking rhyming slang and dodgy
sounding names. Brad and Angelina failed to do this when naming their kid Shiloh Pitt. At some
point, someone at school is going to spoonerise her name.
Craig Stark ]



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.