dirty checking 회피


dirty checking 회피

dirty checking을 회피하는 방식이 두가지가 있는 것 같다하나는 준영속 상태로 만드는 것또 다른 하나는https://stackoverflow.com/questions/47343057/how-to-avoid-dirty-checking-in-hibernate@Autowired private SessionFactory sessionFactory; @OneToMany(mappedBy = "companyId") public Set< Token > getTokens() { setFlushModeManual(); tokens.remove( token ); setFlushModeAuto(); return tokens; } private void setFlushModeManual() { sessionFactory.getCurrentSession().setFlushMode(FlushMode.MANUAL); } private void setFlushModeAuto() { sessionFactory.getCurrentSession().setFlushMode(Flush..........



원문링크 : dirty checking 회피