Skip to content

Doma 2.2.0 Migration Guide

Toshihiro Nakamura edited this page Sep 29, 2024 · 1 revision

This page provides important notes when upgrading Doma from one version to a higher version.

For a complete list of changes, please refer to the release notes.

2.2.0

When upgrading from version 2.1.0, please pay attention to the following points:

Changes to Naming Convention

The behavior of the following enumerators in NamingType has been modified:

  • SNAKE_LOWER_CASE
  • SNAKE_UPPER_CASE

If you expect the same behavior as in version 2.1.0, please use the following enumerators instead:

  • LENIENT_SNAKE_LOWER_CASE
  • LENIENT_SNAKE_UPPER_CASE

Alternatively, specify the name explicitly in @Table or @Column.

Specification Changes in Some Methods of EntityType

This change will not affect you unless you are directly calling these methods from your application.

Some methods of EntityType now return values before applying naming conventions:

  • getTableName
  • getQualifiedTableName

To retrieve values after applying naming conventions, use the methods introduced in version 2.2.0 with the same names.

Specification Changes in Some Methods of EntityPropertyType

This change will not affect you unless you are directly calling these methods from your application.

Some methods of EntityPropertyType now return values before applying naming conventions:

  • getColumnName

To retrieve values after applying naming conventions, use the methods introduced in version 2.2.0 with the same names.

Changes to the Naming Format of SQL Files Specific to Mssql2008Dialect

For SQL files specific to Mssql2008Dialect, please add -mssql before the .sql extension. For example, use selectById-mssql.sql.