문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
java:jpa [2014/02/06 14:15] kwon37xi |
java:jpa [2023/01/05 17:00] (현재) kwon37xi |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== JPA ====== | ====== JPA ====== | ||
+ | * [[java: | ||
+ | * [[java: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[java: | ||
* [[java: | * [[java: | ||
+ | * [[java: | ||
* [[gradle: | * [[gradle: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[database: | ||
+ | * [[java: | ||
- | ===== Query Hint ===== | + | ===== Gradle과 JPA ===== |
- | * [[http:// | + | * JPA(Hibernate)는 persistence.xml이 있는 클래스 디렉토리에서 Entity class들을 찾는데, gradle은 resources 와 java class를 서로 다른 디렉토리에 저장해서 엔티티를 자동으로 찾지 못하는 문제가 발생한다. |
- | * '' | + | * 이때 |
- | < | + | * 혹은 java class와 resources의 build 결과 디렉토리를 동일하게 맞추면 된다.< |
- | Hint Description | + | sourceSets.main.output.resourcesDir = sourceSets.main.output.classesDir |
- | org.hibernate.timeout Query timeout in seconds ( eg. new Integer(10) ) | + | |
- | org.hibernate.fetchSize Number of rows fetched by the JDBC driver per roundtrip ( eg. new Integer(50) ) | + | // 아래는 아마 불필요할 것임. persistence.xml은 main/ |
- | org.hibernate.comment Add a comment to the SQL query, useful for the DBA ( e.g. new String(" | + | sourceSets.test.output.resourcesDir = sourceSets.test.output.classesDir |
- | org.hibernate.cacheable Whether or not a query is cacheable ( eg. new Boolean(true) ), defaults to false | + | |
- | org.hibernate.cacheMode Override the cache mode for this query ( eg. CacheMode.REFRESH ) | + | |
- | org.hibernate.cacheRegion Cache region of this query ( eg. new String(" | + | |
- | org.hibernate.readOnly Entities retrieved by this query will be loaded in a read-only mode where Hibernate will never dirty-check them or make changes persistent ( eg. new Boolean(true) ), default to false | + | |
- | org.hibernate.flushMode Flush mode used for this query (useful to pass Hibernate specific flush modes, in particular MANUAL). | + | |
- | org.hibernate.cacheMode Cache mode used for this query | + | |
</ | </ | ||
- | |||
===== 읽어볼 문서 ===== | ===== 읽어볼 문서 ===== | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
줄 31: | 줄 34: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[https:// |