https://kotlinlang.org logo
#komapper
Title
# komapper
d

dave08

10/15/2023, 11:53 AM
Also, I think this is a little bug:
@KomapperColumn(alternateType = ClobString::class)
doesn't seem to support the
like
infix in queries...
Is there a workaround @Toshihiro Nakamura? This is really blocking me to release a service to production now...
Also, it seems like if I don't add that annotation to a property that's a
String
, and the field is a mysql
Text
field, there's no error, it just returns an empty string... could that be?
Maybe
ClobString
should derive from
CharSequence by value
?
I'm not sure if it would cause boxing... but that might solve the problem w/o making another
like
function for it...
Yup! I made my own ClobString type deriving from CharSequence, and it seemed to solve my compiling problem -- I'll deploy this to our dev environment to see if it actually works...
t

Toshihiro Nakamura

10/15/2023, 1:02 PM
That’s right. Define your ClobString as workaround:
Copy code
package org.komapper.core.type

@JvmInline
value class ClobString(val value: String) : CharSequence by value
d

dave08

10/15/2023, 1:03 PM
Should I open an issue in Github for this?
t

Toshihiro Nakamura

10/15/2023, 1:06 PM
Yes, I would appreciate that.
d