title: update hibernate JPA
body: <p>IN hibernate JPA how can I  update of a object?
  I have one Project entity having two attributes. projectid and projectname.
  Here projectid is primary key. Now in my update method i should be able to modify both the attributes projectid and projectname. The query shouldl look like the in the following way.</p>
  
  <pre><code>update PROJECT set ID='123',NAME='Intel' where ID='122'
  </code></pre>
  
  <p>I want to assign the project_id to the user_id.</p>
  
  <pre><code>project_table
  -------------
  project_id  project_name  
  -------------------------  
  LK987       LockSystem  
  MK876       MockSystem      
  
  
  user_project_table
  ---------------------  
  user_id        project_id  
  --------------------------  
  12343       LK987  
  12344       MK876  
  12343       TK656  
  12675       TK656  
  </code></pre>