Skip to content

Commit

Permalink
Fix escaping CodeBlock.of("${CodeBlock.toString()}") (#3340)
Browse files Browse the repository at this point in the history
  • Loading branch information
hfhbd committed Jun 26, 2022
1 parent f03d780 commit 9c7aa50
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -234,7 +234,7 @@ internal abstract class ColumnTypeMixin(

override fun encode(value: CodeBlock): CodeBlock {
val columnName = (parent as SqlColumnDef).columnName
return wrappedType.encode(CodeBlock.of("$value.${columnName.text}"))
return wrappedType.encode(CodeBlock.of("%L.${columnName.text}", value))
}

override fun decode(value: CodeBlock) = CodeBlock.of("%T(%L)", javaType, wrappedType.decode(value))
Expand Down

0 comments on commit 9c7aa50

Please sign in to comment.