Skip to content

returnInstanceForEmptyRow does not work for constructor auto-mapping #2665

Closed
@cvmocanu

Description

@cvmocanu

MyBatis version

3.5.10

Database vendor and version

PostgreSQL 11.6 (Debian 11.6-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit

Test case or example project

mybatis-bug.zip

Steps to reproduce

You need to have Java, Docker, and Docker-Compose installed.
From the root of the project:

  • docker-compose up -d
  • ./gradlew run

Expected result

The project prints ALL OK

Actual result

The project throws an exception got null row because all columns are null, even though returnInstanceForEmptyRow is true.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions