About mybatis errors with parameter and no-parameter constructors

17 views
Skip to first unread message

张迷

unread,
Oct 25, 2024, 7:46:24 PM10/25/24
to mybatis-user
I have a query function whose corresponding xml is shown in the figure
image
For the TeacherDto, it is defined as
image
When the function getTeacherListWithStudents is called, it throws org.apache.ibatis.executor.ExecutorException: No constructor found in com.example.mybatis.pojo.TeacherDto matching [java.lang.Integer, java.lang.String, java.lang.String]. But when I just leave the parameterless constructor, it works. I really hope you can answer my doubts, I do not know enough about mybatis source code.

Guy Rouillier

unread,
Oct 26, 2024, 3:56:53 AM10/26/24
to MyBatis User
I'm not able to view your images.  Have you put them on a site that is viewable by public?

--
Guy Rouillier
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mybatis-user/25281dbc-cc89-434e-a68a-8499ea0e5b02n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages