• Post Reply Bookmark Topic Watch Topic
  • New Topic

No difference between OUTER and INNER joins...  RSS feed

Alexander V Fahrmann
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to JSR 220 (Java Persistence API) - aka "ejb-spec-persistence"
(the last paragraph from 2.1.7 Entity Relationships):

If there are no associated entities for a multi-valued relationship of an entity fetched from the database,
the persistence provider is responsible for returning an empty collection as the value of the relationship.

Does this mean that, actually, there is NO DIFFERENCE between LEFT [OUTER] JOIN and [INNER] JOIN (in case of multi-valued associations (@OneToMany, @ManyToMany))?

I did not cope with the issue too much yet - just had developed a simple
application which proved that the difference is REALLY absent.
But, maybe, I am wrong?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!