Skip to content

Fix return value check for methods with returning option #262

@xterao

Description

@xterao

Describe the bug
Currently, when using SQL templates for Insert, Update, and Delete (including Batch operations), the return type check enforces that the return value must always be of type int or int[].

  @Insert(sqlFile = true)
  Result<Dept> insertBySqlFile(Dept entity);

Expected behavior
In practice, when the input parameter is an immutable Entity class, the expected return type should be Result or BatchResult.
This issue will revise the check logic to correctly handle this case.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions