Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public void updateArea(Long areaId, Long regionId){
  2. Session session = getSessionFactory().openSession();
  3. Query q = session.createQuery("update Area set region_id =:region_id"+
  4. " where id=:id and coalesce(is_deleted,0)<>1");
  5. q.setLong("region_id", regionId);
  6. q.setLong("id", areaId);
  7. q.executeUpdate();
  8. session.close();
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement