session.update(entity);
session.saveOrUpdate(entity);
    public void updateEntity(SecurityEntity entity) throws DataBackendException {        Transaction transaction = null;        try {            transaction = session.beginTransaction();            session.update(entity);            transaction.commit();        } catch (HibernateException he) {            try {                if (transaction != null) {                    transaction.rollback();                }                if (he.getMessage().indexOf("Another object was associated with this id") > -1) {                    session.close();                    updateEntity(entity);                } else {                    throw new DataBackendException("updateEntity(" + entity + ")", he);                }            } catch (HibernateException hex) {            }        }        return;    }