Skip to content

Configuration

To configure automatic mapping of rows into objects, we start by creating a RowMapperRegistry.

var registry = new RowMapperRegistry()

After that we start with registering the default mapper, which You can find at <Database>Mapper. Mapper for Postgres are located as PostgresqlMapper and can always be retrieved via getDefaultMapper.

var registry = new RowMapperRegistry()
registry.register(PostgresqlMapper.getDefaultMapper())

After that we register our registry at our QueryConfiguration.

QueryConfiguration.setDefault(QueryConfiguration.builder(dc)
        .setRowMapperRegistry(new RowMapperRegistry().register(PostgresqlMapper.getDefaultMapper()))
        .build());