title: UPDATE and JOIN with JPQL
body: <p>Tutorials and samples about JPQL always deal with SELECT statement and sometimes, simple UPDATE statements. I need to update a table with a join.</p>
  
  <p>I have simplified my env : </p>
  
  <p>KEY<br>
  = id<br>
  - counter  </p>
  
  <p>APPLET<br>
  = id<br>
  ! key_id (1-1)  </p>
  
  <p>DEVICE<br>
  = id<br>
  ! applet_id (1-1)<br>
  ! user_id (1-n)  </p>
  
  <p>USER<br>
  = id<br>
  - login</p>
  
  <p>A device has a unique applet, which has a unique keyset. But an user can own several devices.</p>
  
  <p>I need to reset the counter of every KEY attached to the USER login "x".</p>
  
  <p>I tried some syntax with UPDATE and JOIN, without success. Any clue ? </p>
  
  <p>Thank you.</p>