Skip to content
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

MyBatis 3.5.0 inconsistent handling of keyProperty #1485

Closed
morvael opened this Issue Feb 25, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@morvael
Copy link

morvael commented Feb 25, 2019

@Options(useGeneratedKeys = true, keyProperty = "n.id", keyColumn = "id")
int insertDataObject(@Param("n") DataObject dataObject);

In 3.5.0 keyProperty
"id" works with non-batch executor, "n.id" doesn't
"n.id" works with batch executor, "id" doesn't
"n.id" works with multiple parameters in mapper method, "id" doesn't

Please allow using "n.id" for single parameter methods with non-batch executors again. It was working before 3.5.0.

@kazuki43zoo

This comment has been minimized.

Copy link
Member

kazuki43zoo commented Feb 25, 2019

@morvael
Thank you for your reporting. Probably, this issue related with #1249. (This is specification changes since 3.5).

@harawata
Could you support this?

@harawata

This comment has been minimized.

Copy link
Member

harawata commented Feb 26, 2019

I'll try to improve the consistency.
Thank you for the report!

@harawata harawata closed this in 36d3a4a Feb 27, 2019

@harawata harawata self-assigned this Feb 27, 2019

@harawata harawata added the bug label Feb 27, 2019

@harawata harawata added this to the 3.5.1 milestone Feb 27, 2019

@harawata

This comment has been minimized.

Copy link
Member

harawata commented Feb 27, 2019

@morvael ,

It should be fixed in the latest 3.5.1-SNAPSHOT.
As it was a major rewrite, I would suggest you to verify the fix with your solution. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.