title: JPQL - no date arithmetic
body: <p>I understand JPQL does not let us do date arithmetic, but i'm new to it so i'm wondering if there's a simple way to tackle this problem (i'm using eclipselink):</p>
  
  <p>I have two entities, entity A which has a one-to-many relationship with entity B.</p>
  
  <p>Entity A stores the time, and each record for entity B has a date.</p>
  
  <p>I want to select rows from entity B between a date range, taking into account the time field of entity A which it belongs to.</p>
  
  <p>One solution i've thought about is just fetching all entities within the date range (ignoring the time), and then manually filtering out the results taking into account the time in entity A, after the query has ran.</p>
  
  <p>But, I want to know if there's a JPA way, which won't result in unnecessary records being fetched.</p>