From 34fd495bc5d2bbf4590b7475a3393b9962007240 Mon Sep 17 00:00:00 2001 From: Georg Leber Date: Fri, 23 Jul 2021 11:09:40 +0200 Subject: [PATCH 1/2] Documentation: Changing parameter to ordinal Using named parameter in find() leads to: java.lang.IllegalArgumentException: Could not locate ordinal parameter [1], expecting one of [] --- docs/src/main/asciidoc/hibernate-orm-panache.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/hibernate-orm-panache.adoc b/docs/src/main/asciidoc/hibernate-orm-panache.adoc index 2fc29705740fb..c95e6ef89dc65 100644 --- a/docs/src/main/asciidoc/hibernate-orm-panache.adoc +++ b/docs/src/main/asciidoc/hibernate-orm-panache.adoc @@ -605,7 +605,7 @@ You can reference a named query instead of a (simplified) HQL query by prefixing [source,java] ---- @Entity -@NamedQuery(name = "Person.getByName", query = "from Person where name = :name") +@NamedQuery(name = "Person.getByName", query = "from Person where name = ?!") public class Person extends PanacheEntity { public String name; public LocalDate birth; From 9b3105b39d3765334d3056ee75c4a9cc199e79f2 Mon Sep 17 00:00:00 2001 From: Georg Leber Date: Fri, 23 Jul 2021 11:15:12 +0200 Subject: [PATCH 2/2] Correcting typo in ordinal parameter --- docs/src/main/asciidoc/hibernate-orm-panache.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/hibernate-orm-panache.adoc b/docs/src/main/asciidoc/hibernate-orm-panache.adoc index c95e6ef89dc65..e5a21f2d7b33f 100644 --- a/docs/src/main/asciidoc/hibernate-orm-panache.adoc +++ b/docs/src/main/asciidoc/hibernate-orm-panache.adoc @@ -605,7 +605,7 @@ You can reference a named query instead of a (simplified) HQL query by prefixing [source,java] ---- @Entity -@NamedQuery(name = "Person.getByName", query = "from Person where name = ?!") +@NamedQuery(name = "Person.getByName", query = "from Person where name = ?1") public class Person extends PanacheEntity { public String name; public LocalDate birth;