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
The field key return null when query , if set the @column("key") it works fine ; but it'll error when insert or update because key is a keyword in mysql;
If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal yet complete sample that reproduces the problem.
You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
publicinterfaceSpotMarginUserSettingReadRepositoryextendsR2dbcRepository<Demo, Long> {
@Query("select * from demo where `key`= 'key1' and uid = :uid limit 1")
Mono<Demo> getSomeDemo(longuid);
}
the field key in result is null;
if i remove backtick in @column("`key`") it works fine;
but when it excutes insert or update, it will throw a bad sql error;
R2dbcMappingContext doesn't quote identifiers by default. Can you retest when setting R2dbcMappingContext.setForceQuote(true)? I think you will have to register a custom R2dbcMappingContext bean.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Activity
[-]mysql keyword is't mapping to the result[/-][+]mysql keyword isn't mapping to the result[/+]mp911de commentedon Jun 20, 2024
If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal yet complete sample that reproduces the problem.
You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.
maple-seven commentedon Jun 21, 2024
java
sql:
query:
the field
key
in result is null;if i remove backtick in @column("
`key`
") it works fine;but when it excutes insert or update, it will throw a bad sql error;
mp911de commentedon Jun 21, 2024
R2dbcMappingContext
doesn't quote identifiers by default. Can you retest when settingR2dbcMappingContext.setForceQuote(true)
? I think you will have to register a customR2dbcMappingContext
bean.spring-projects-issues commentedon Aug 19, 2024
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
spring-projects-issues commentedon Aug 26, 2024
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.