This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes why join keyword is needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "why join keyword is needed" Watch "why join keyword is needed" New topic

why join keyword is needed

ajse ruku
Ranch Hand

Joined: May 06, 2005
Posts: 193
Hi all,

Being a entry level programmer, i want to know very basic thing. Why does hibernate queries need "Join" keyword. Is it just syntactical thing ?

In plain SQL, we can write something like Select from Employee e , Department d where == d.eid.

There is no Join keyword used here still its inner join. Is'nt ?

Bill Gorder

Joined: Mar 07, 2010
Posts: 1648

The join keyword is left off for example when there is no relationship between the entities as described in this post:

However implicit join syntax can be used where the associations are de-referenced using dot notations which results in an inner join in the resulting SQL statement.

Have a read of this blog, which I think did a pretty good job explaining things

[How To Ask Questions][Read before you PM me]
I agree. Here's the link:
subject: why join keyword is needed
Similar Threads
org.hibernate.exception.GenericJDBCException: could not execute query
main app won't stop when all threads are done running
Externalizable Interface
r they keywords or literals?
Urgent help needed Please.Urgent