-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Regression: Constructor args fails on record types #2840
Comments
It appears that this is a duplicate of the closed #2803. However, it appears the PR that closed that issue is being withdrawn. So perhaps having this new issue open or closing this and reopening 2803 is appropriate. As mentioned by @tzie0062 in that issue, this is a regression from 3.5.9 to 3.5.11. Some explanation seems in order for why this regression is taking place in a patch release, regardless of the attempt of #2804 to fix it. |
Hello @jdmichal , It is the same issue as #2803 . It worked in 3.5.9 because the Now, as documented, in constructor mapping, It is unfortunate that it accidentally worked in ≤ 3.5.9 and I apologize for the confusion, but the right solution to your problem is to specify This is going to be a FAQ, I imagine... 😔 |
MyBatis version
3.5.11 via mybatis-spring-boot-starter 2.3.0
Regression from 3.5.9 via mybatis-spring-boot-starter 2.2.2
Database vendor and version
PostgreSQL 14.x
Test case or example project
Steps to reproduce
record
type and map to it via aconstructor
resultMap
, as above.Expected result
The default
record
constructor would be found and linked.Actual result
The default
record
constructor is not found due to the java type of theResultMapping
beingjava.lang.Object
.Workaround
Define the
javaType
for the constructor args. This was not necessary in version 3.5.9.The text was updated successfully, but these errors were encountered: