Skip to main content

Mapper API

Key Strategies

Assigned keys, AUTO_INCREMENT key retrieval, and composite keys are supported. For method annotations, enable useGeneratedKeys and specify keyProperty; keep the default key source instead of generatedKeySource="resultSet".

See Key Generation. BaseMapper uses the entity's key configuration; annotation methods use their own retrieval settings.

Pagination

Method annotations, BaseMapper, and file-mapper calls by statement ID support pagination. Page numbers start at 0; the total count and current page are queried separately. See Pagination for generated commands and usage notes.