File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/main/java/org/babyfish/jimmer/sql/example Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ repositories {
10
10
}
11
11
12
12
dependencies {
13
- implementation ' org.babyfish.jimmer:jimmer-core:0.0.5 '
14
- implementation ' org.babyfish.jimmer:jimmer-sql:0.0.5 '
15
- annotationProcessor ' org.babyfish.jimmer:jimmer-apt:0.0.5 '
13
+ implementation ' org.babyfish.jimmer:jimmer-core:0.0.6 '
14
+ implementation ' org.babyfish.jimmer:jimmer-sql:0.0.6 '
15
+ annotationProcessor ' org.babyfish.jimmer:jimmer-apt:0.0.6 '
16
16
17
17
implementation ' javax.validation:validation-api:2.0.1.Final'
18
18
implementation ' javax.persistence:javax.persistence-api:2.2'
Original file line number Diff line number Diff line change 6
6
import org .babyfish .jimmer .sql .ast .query .TypedRootQuery ;
7
7
import org .babyfish .jimmer .sql .ast .tuple .Tuple3 ;
8
8
import org .babyfish .jimmer .sql .example .model .AuthorTable ;
9
+ import org .babyfish .jimmer .sql .example .model .AuthorTableEx ;
9
10
import org .babyfish .jimmer .sql .example .model .Book ;
10
11
import org .babyfish .jimmer .sql .example .model .BookTable ;
11
12
@@ -33,7 +34,7 @@ private static void showData(
33
34
int pageSize
34
35
) {
35
36
ConfigurableTypedRootQuery <BookTable , Tuple3 <Book , Integer , Integer >> query =
36
- BookTable .createQuery (SQL_CLIENT , (q , book ) -> {
37
+ SQL_CLIENT .createQuery (BookTable . class , (q , book ) -> {
37
38
if (name != null && !name .isEmpty ()) {
38
39
q .where (book .name ().ilike (name ));
39
40
}
@@ -43,7 +44,7 @@ private static void showData(
43
44
if (authorName != null && !authorName .isEmpty ()) {
44
45
q .where (
45
46
book .id ().in (
46
- AuthorTable .createSubQuery (q , (sq , author ) -> {
47
+ q .createSubQuery (AuthorTableEx . class , (sq , author ) -> {
47
48
sq .where (
48
49
author .firstName ().ilike (authorName ).or (
49
50
author .lastName ().ilike (authorName )
You can’t perform that action at this time.
0 commit comments