사용자 도구

사이트 도구


java:jpa:association

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
java:jpa:association [2018/09/10 12:32]
kwon37xi [@JoinFormula]
java:jpa:association [2019/04/18 16:49]
kwon37xi
줄 22: 줄 22:
 ==== @JoinFormula ==== ==== @JoinFormula ====
   * 관계가 맺어져 있지 않을 경우 ''null''값을 저장해야 하지만 Legacy DB의 경우 ''0'' 이나 기타 다른 값을 저장하는 경우가 있다.    * 관계가 맺어져 있지 않을 경우 ''null''값을 저장해야 하지만 Legacy DB의 경우 ''0'' 이나 기타 다른 값을 저장하는 경우가 있다. 
-  * [[https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/annotations/JoinFormula.html|@JoinFormula]]+  * [[https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/annotations/JoinFormula.html|@JoinFormula]]<code java> 
 +@JoinFormula(value="CASE the0isNullColumn WHEN 0 THEN NULL ELSE the0isNullColumn END"
 +</code>
   * [[https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/annotations/JoinColumnOrFormula.html|@JoinColumnOrFormula]]   * [[https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/annotations/JoinColumnOrFormula.html|@JoinColumnOrFormula]]
   * [[https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/annotations/JoinColumnsOrFormulas.html|@JoinColumnsOrFormulas]]   * [[https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/annotations/JoinColumnsOrFormulas.html|@JoinColumnsOrFormulas]]
줄 34: 줄 36:
   * [[https://vladmihalcea.com/how-to-customize-an-entity-association-join-on-clause-with-hibernate-joinformula/|How to customize an entity association JOIN ON clause with Hibernate @JoinFormula - Vlad Mihalcea]]   * [[https://vladmihalcea.com/how-to-customize-an-entity-association-join-on-clause-with-hibernate-joinformula/|How to customize an entity association JOIN ON clause with Hibernate @JoinFormula - Vlad Mihalcea]]
   * [[https://vladmihalcea.com/how-to-map-the-latest-child-of-a-parent-entity-using-hibernate-joinformula/#more-6983|How to map the latest child of a parent entity using Hibernate @JoinFormula - Vlad Mihalcea]]   * [[https://vladmihalcea.com/how-to-map-the-latest-child-of-a-parent-entity-using-hibernate-joinformula/#more-6983|How to map the latest child of a parent entity using Hibernate @JoinFormula - Vlad Mihalcea]]
 +
 +=== 참조 ===
 +  * [[https://www.baeldung.com/jpa-join-types|JPA Join Types | Baeldung]]
  
java/jpa/association.txt · 마지막으로 수정됨: 2020/11/12 14:53 저자 kwon37xi