Skip to content

Doma 3.x Migration Guide

Toshihiro Nakamura edited this page Jan 19, 2025 · 4 revisions

Upgrading to Version 3.3

StandardJdbcMappingVisitor#visitObjectWrapper

Due to the changes introduced in #1252, modifications have been made to the visitObjectWrapper method in org.seasar.doma.jdbc.dialect.StandardDialect.StandardJdbcMappingVisitor. If your custom class overrides this method, please update it accordingly to reflect the changes. If no changes are made to your implementation, the functionality introduced in #1252 will simply be unavailable. There are no other disadvantages.

SqlLogFormattingVisitor

As part of the changes introduced in #1252 and #1262, all existing methods in org.seasar.doma.jdbc.SqlLogFormattingVisitor have been marked as deprecated. Instead, use the methods with the same name that have org.seasar.doma.jdbc.JdbcMappingHint as the type of the third parameter.

Upgrading to Version 3.0

Java Version

Please use Java 17 or later.

Removed APIs

org.seasar.doma.jdbc.Naming

The following two elements have been removed:

  • LENIENT_SNAKE_LOWER_CASE
  • LENIENT_SNAKE_UPPER_CASE

Please use SNAKE_LOWER_CASE or SNAKE_UPPER_CASE instead.

org.seasar.doma.jdbc.entity.NamingType

The following two elements have been removed:

  • LENIENT_SNAKE_LOWER_CASE
  • LENIENT_SNAKE_UPPER_CASE

Please use SNAKE_LOWER_CASE or SNAKE_UPPER_CASE instead.

org.seasar.doma.jdbc.entity.EntityType

The following methods have been removed:

  • public String getTableName()
  • public String getQualifiedTableName()
  • public String getQualifiedTableName(Function<String, String> quoteFunction)

Instead, please use the methods with the same names that take BiFunction<NamingType, String, String> namingFunction as a parameter.

org.seasar.doma.jdbc.dialect.StandardDialect

The following methods have been removed:

  • protected Calendar makeRoundedUpClandar(java.util.Date date)
  • protected Calendar makeRoundedDownClandar(java.util.Date date)

Please use makeRoundedUpCalendar or makeRoundedDownCalendar instead.

org.seasar.doma.SingletonConfig

The SingletonConfig annotation, which was used to create singletons, has been removed. If needed, please create singletons manually.

org.seasar.doma.Dao

The config element has been removed.

Please pass the Config instance to the DAO implementation class using the constructor.