question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use param names for constructor auto-mapping

See original GitHub issue

I want MyBatis to map automatically with the constructor by argument names without defining <constructor></constructor> or @ConstructorArgs.

I am using kotlin’s data class, I want mybatis to be automatically mapped, just like I did through the empty constructor and getter setter in java.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
harawatacommented, Apr 24, 2022

#2196 is merged. I would appreciate if you test the feature using the latest 3.5.10-SNAPSHOT.

Just to reiterate, when there is no matching column in the result set, an exception is thrown.

Thank you all for your contributions!

1reaction
harawatacommented, Mar 7, 2021

I only have a vague plan at this point, but yes, it should work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automapper - how to map to constructor parameters instead of ...
In cases where my destination setters are private, I might want to map to the object using the destination object's constructor ...
Read more >
Construction - AutoMapper documentation
AutoMapper can map to destination constructors based on source members: ... If the destination constructor parameter names don't match, you can modify them ......
Read more >
Passing Parameters with Automapper - Code Buckets
What I want to do is pass information from the customer into the address mappings. I'm going to use parameters for that. The...
Read more >
Reflection and C# optional constructor arguments
(AutoMapper allows constructors to be used for creating new instances, using the "ConvertUsing" method, but it doesn't do its magic with ...
Read more >
AutoMapper.xml 3.3.1 - PowerShell Gallery
Use this for child/nested containers </summary> <param name="constructor"></param> </member> <member name="P:AutoMapper.IMappingOperationOptions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found