title: Using Annotations In JPA can I limit child records with a where clause?
body: <p>I have an EJB with an @onetomany relationship like this in my parent class (Timeslot):</p>
  
  <pre><code>@OneToMany(mappedBy = "rsTimeslots")
  private List&lt;RsEvents&gt; rsEventsList;
  </code></pre>
  
  <p>I also have a function to get the rsEventList:</p>
  
  <pre><code>public void setRsEventsList(List&lt;RsEvents&gt; rsEventsList) {
      this.rsEventsList = rsEventsList;
  }
  </code></pre>
  
  <p>This was all auto generated so far. In my view-layer code I can get a timeslot object and do something like <code>timeslot.getRsEventList()</code> and get all children of this timeslot. Now I need to restrict that list based on a criteria. For example I only want events that are children of this timeslot with a status of 1. Is there a way to do this with annotations? </p>