// match all books that have "Data Grid" in their title or description
// and return only their title and publication year
Query query = queryFactory.from(Book.class)
.select("title", "publicationYear")
.having("title").like("%Data Grid%")
.or().having("description").like("%Data Grid%"))
.build();
// match all books that have "Data Grid" in their title or description
// and return only their title and publication year
Query query = queryFactory.from(Book.class)
.select("title", "publicationYear")
.having("title").like("%Data Grid%")
.or().having("description").like("%Data Grid%"))
.build();
Copy to ClipboardCopied!Toggle word wrapToggle overflow