Hibernate: evict() a persistent object while storing its changes

前端 未结 3 600
隐瞒了意图╮
隐瞒了意图╮ 2020-12-31 03:38

I have a persistent hibernate object I obtained using session.save(object)

I changed it since.

I want to execute session.evict(object)

3条回答
  •  梦谈多话
    2020-12-31 04:30

    Couldn't you manually save the object first via something like

    session.saveOrUpdate(theObject);
    session.evict(theObject);
    

提交回复
热议问题