Nicolas Noffke (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5a9bd36...
) *commented* on HHH-16247 (
https://hibernate.atlassian.net/browse/HHH-16247?atlOrigin=eyJpIjoiNjRiMD...
)
Re: Criteria Query with Object-Typed Embedded Parameter throws AssertionError (
https://hibernate.atlassian.net/browse/HHH-16247?atlOrigin=eyJpIjoiNjRiMD...
)
But it seems that your repository interface is actually WithEmbeddedRepository
, and that is the interface which Spring Data fills in the implementation
of. In this interface, AnEmbeddable was assigned a concrete type argument,
and so when Spring Data fills in the implementation of the
generically-typed interface method, it has all the information it needs to
pass the correct concrete parameter type to CriteriaBuilder.parameter().
I’m guessing it's passing Object.class because someone is lazy and could
not be bothered substituting type arguments for type parameters.
That is hard for me to answer. You’re right that it would generally be possible (with some
effort) to get hold of the concrete types involved. As to the feasibility of doing it in
spring data jpa, that is better answered by the maintainers of that project, I’m afraid.
(
https://hibernate.atlassian.net/browse/HHH-16247#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16247#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100228- sha1:e911e2c )