-
Notifications
You must be signed in to change notification settings - Fork 356
R2dbcEntityTemplate
fails to instantiate interface using fluent as(…)
projection
#1690
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
Comments
Care to upgrade to Spring Data Relational/R2DBC 3.2.1-SNAPSHOT for both artifacts and retest? I'm not able to reproduce the issue without further details. Please provide a minimal yet complete sample that reproduces the problem. |
I extract a test project. You can run the unit test at
|
Thanks a lot. The difference is that your entity implements the interface and effectively it isn't a projection. |
R2dbcEntityTemplate
fails to instantiate interface using fluent as(…)
projection
Using as with an interface that is implemented by the entity, we no longer attempt to instantiate the interface bur use the entity type instead. Closes #1690
Now I have an another question. For my use case, I should use public Mono<IMember> findById(final String id) {
final Query query = Query
.query(CriteriaBuilder.buildIdQuery(id));
return entityTemplate.select(MemberBo.class)
.from(TABLE__MEMBER)
.matching(query)
.first()
.map(Function.identity());
} |
I have define a query as
while
IMember
is the super interface ofMemberBo
.The query can correctly run at version 3.1.5 of
spring-data-r2dbc
, but throws exception after upgrade to version 3.2.0The text was updated successfully, but these errors were encountered: