-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Projection section in reference documentation. #3449
Conversation
For the time being we at least now document the current behaviour and how to cope with it. See: #3286
|
||
[NOTE] | ||
==== | ||
Some JPA providers may require additional hints when working with <<projections.dtos,Class-based projections>> especially when using those directly with method derived queries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That confuses me. @PersistenceCreator
is a Spring Data annotation, I'm sure that JPA providers don't care about that.
I would expect that the situation is more: We need either a constructor taking all the properties as arguments and if it isn't the only constructor we need it to be marked with @PersistenceCreator
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's our code that determines input properties. We use our mechanism to discover whether there is a preferred constructor and the properties it takes.
[NOTE] | ||
==== | ||
Some JPA providers may require additional hints when working with <<projections.dtos,Class-based projections>> especially when using those directly with method derived queries. | ||
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't so much outlined below but demonstrated, isn't it?
52ee55f
to
61e6d36
Compare
For the time being we at least now document the current behaviour and how to cope with it. Closes: #3286 Original pull request: #3449
Tweak wording. See: #3286 Original pull request: #3449
For the time being we at least now document the current behaviour and how to cope with it. Closes: #3286 Original pull request: #3449
Tweak wording. See: #3286 Original pull request: #3449
For the time being we at least now document the current behaviour and how to cope with it. Closes: #3286 Original pull request: #3449
Tweak wording. See: #3286 Original pull request: #3449
Related to: spring-projects/spring-data-commons#3216