Skip to content

Criteria APIのログ出力のバグ? #893

Answered by nakamura-to
gikeihi asked this question in Q&A
Discussion options

You must be logged in to vote

共有ありがとうございます。
SQLの真偽値のリテラルをどう表現するかはDBMSごとに違いがあります。例えばSQL Serverではsingle quotationで囲む必要があるのですがMySQLでは異なるようですね。次のバージョンではMySQLの場合は囲まないように修正しようと思います。

ちなみに、2.53.1でも下記リンク先のメソッドをオーバーライドするようなコードを書くことで対応ができます。
https://github.com/domaframework/doma/blob/2.53.1/doma-core/src/main/java/org/seasar/doma/jdbc/dialect/StandardDialect.java#L591

(MysqlSqlLogFormattingVisitorを継承したクラスでオーバーライドし、MysqlSqlLogFormattingVisitorのインスタンスをMysqlDialectのコンストラクタに渡すようにします)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gikeihi
Comment options

Answer selected by gikeihi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants