Fix typo
This commit is contained in:
parent
3274776acc
commit
af599d7d89
|
@ -152,7 +152,7 @@ Let's just stick it on the `Book` class:
|
|||
----
|
||||
@CheckHQL // validate the query at compile time
|
||||
@NamedQuery(name = "#findByTitleAndType",
|
||||
query = "select book from Book book where book.title like :titlen and book.type = :type")
|
||||
query = "select book from Book book where book.title like :title and book.type = :type")
|
||||
@Entity
|
||||
public class Book { ... }
|
||||
----
|
||||
|
@ -167,7 +167,7 @@ Now the Metamodel Generator adds the following method declaration to the metamod
|
|||
**/
|
||||
public static List<Book> findByTitleAndType(@Nonnull EntityManager entityManager, String title, Type type) {
|
||||
return entityManager.createNamedQuery(QUERY_FIND_BY_TITLE_AND_TYPE)
|
||||
.setParameter("titlePattern", title)
|
||||
.setParameter("title", title)
|
||||
.setParameter("type", type)
|
||||
.getResultList();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue