Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void updateArea(Long areaId, Long regionId){
- Session session = getSessionFactory().openSession();
- Query q = session.createQuery("update Area set region_id =:region_id"+
- " where id=:id and coalesce(is_deleted,0)<>1");
- q.setLong("region_id", regionId);
- q.setLong("id", areaId);
- q.executeUpdate();
- session.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement