을 분리, 내 코드는 간다 :최대 절전 모드 좋은 방법 나는 최대 절전 모드 쿼리를 생성 한 후 객체
@SuppressWarnings("unchecked")
List<SendCommands> list = query.list();
session.evict(list);
if(list.isEmpty())
return null;
SendCommands dst = list.get(0);
return dst;
이 예를 들어, "좋은"연습 무엇입니까 : 분리
1) (퇴거)
@SuppressWarnings("unchecked")
List<SendCommands> list = query.list();
if (list.isEmpty())
return null;
SendCommands dst = list.get(0);
session.evict(dst);
return dst;
,174 : 다음 먼저 세트의 객체 또는
2) (분리 퇴거) 세트의 첫 번째 객체를 반환 전체 결과 집합
정확히 달성하기를 원하십니까? 왜 물체를 분리해야합니까? – axtavt
개체를 분리하여 다른 레이어로 전달해야합니다. 문서에 따르면 트랜잭션의 끝에서 개체가 손실 될 수 있습니다. 왜 개체를 분리하려고합니까? – iliaden