title: Is it possibile to perform JOIN in JPQL?
body: <p>I'm using Objectdb, an object database, to save Cars to rent and requests for rental.
  When one customers ask for a rental of a car, I have to check if the car is available in that period (from start date to end date). In my database I have two tables (two classes): car and rent. This is the query to check if the car is available:</p>
  
  <pre><code>public List&lt;Car&gt; findByType(CarType type, Date start, Date end) {
  
      TypedQuery&lt;Car&gt; query = em.createQuery("SELECT c FROM Car c, Rental r "
              + "WHERE c.type = :cartype AND "
              + "((r.start &gt; :start AND r.start &gt; :end) OR "
              + "(r.end &lt; :start AND r.end &lt; :end))", entityClass);
  ...
  </code></pre>
  
  <p>The problem is that this query always return 0 cars available.
  Is there a problem with a JOIN in JPQL? Or, is the query bad formed?
  thank you</p>