전체 글136 [JPA] Hibernate에서 엔티티 복제하기 MyEntity clone = entityManager.find(MyEntity.class, ID); entityManager.detach(clone); // 기존 엔티티에 영항을 미치지 않도록 영속성 분리 clone.setId(null); // 기존 엔티티와 아이디가 겹치지 않도록 null로 변경 clone.setXXX(XXX); // 다른 속성값 변경 가능 entityManager.persist(clone); // 엔티티가 생성되도록 영속성 연결 ref : https://stackoverflow.com/questions/9944882/how-to-deep-copy-a-hibernate-entity-while-using-a-newly-generated-entity-identif 2023. 1. 11. 2022년 개발 언어 순위 (스택오버플로우) ref : https://survey.stackoverflow.co/2022/#most-popular-technologies-language-prof 2023. 1. 8. [JXLS] jx:if 사용법 jx:if(condition="employee.payment 2022. 12. 15. [Java] List를 List를 포함한 Map으로 바꾸기 List를 Map로 바꾸기 public Map getMap(List strings) { return strings.stream().collect( Collectors.groupingBy(String::length, HashMap::new, Collectors.toCollection(ArrayList::new)) ); } ref : https://stackoverflow.com/questions/40772997/how-to-convert-listv-into-mapk-listv-with-java-8-streams-and-custom-list 2022. 11. 14. 이전 1 ··· 16 17 18 19 20 21 22 ··· 34 다음