You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some JPA providers may require additional hints when working with <<projections.dtos,Class-based projections>> especially when using those directly with method derived queries.
22
+
If you are facing errors like `JpaSystemException: Specified result type did not match Query selection type` make sure to provide a constructor hint via `@PersistenceCreator` to be passed on, as outlined below:
23
+
24
+
[source,java]
25
+
----
26
+
public class NamesOnly {
27
+
28
+
private final String firstname;
29
+
private final String lastname;
30
+
31
+
protected NamesOnly() { }
32
+
33
+
@PersistenceCreator
34
+
public NamesOnly(String firstname, String lastname) {
0 commit comments