Skip to content

Commit

Permalink
0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
babyfish-ct committed May 17, 2022
1 parent e75b8f0 commit cdd1a61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions example/jimmer-sql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repositories {
}

dependencies {
implementation 'org.babyfish.jimmer:jimmer-core:0.0.5'
implementation 'org.babyfish.jimmer:jimmer-sql:0.0.5'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.0.5'
implementation 'org.babyfish.jimmer:jimmer-core:0.0.6'
implementation 'org.babyfish.jimmer:jimmer-sql:0.0.6'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.0.6'

implementation 'javax.validation:validation-api:2.0.1.Final'
implementation 'javax.persistence:javax.persistence-api:2.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.babyfish.jimmer.sql.ast.query.TypedRootQuery;
import org.babyfish.jimmer.sql.ast.tuple.Tuple3;
import org.babyfish.jimmer.sql.example.model.AuthorTable;
import org.babyfish.jimmer.sql.example.model.AuthorTableEx;
import org.babyfish.jimmer.sql.example.model.Book;
import org.babyfish.jimmer.sql.example.model.BookTable;

Expand Down Expand Up @@ -33,7 +34,7 @@ private static void showData(
int pageSize
) {
ConfigurableTypedRootQuery<BookTable, Tuple3<Book, Integer, Integer>> query =
BookTable.createQuery(SQL_CLIENT, (q, book) -> {
SQL_CLIENT.createQuery(BookTable.class, (q, book) -> {
if (name != null && !name.isEmpty()) {
q.where(book.name().ilike(name));
}
Expand All @@ -43,7 +44,7 @@ private static void showData(
if (authorName != null && !authorName.isEmpty()) {
q.where(
book.id().in(
AuthorTable.createSubQuery(q, (sq, author) -> {
q.createSubQuery(AuthorTableEx.class, (sq, author) -> {
sq.where(
author.firstName().ilike(authorName).or(
author.lastName().ilike(authorName)
Expand Down

0 comments on commit cdd1a61

Please sign in to comment.