add @Convert(to = ....class)#819
Conversation
cbed5fe to
ab99612
Compare
ab99612 to
8b5f326
Compare
| * | ||
| * @since 4.0 | ||
| */ | ||
| Class<?> to() default void.class; |
There was a problem hiding this comment.
I wonder if something like as() wouldn't be less confusing here... because this is fundamentally not a one-way conversion.
But then as is a keyword in Groovy, so there's that.
There was a problem hiding this comment.
I think if it were @Persist or @Treat then as would be better. But "convert as string" isn't grammatically correct.
Co-authored-by: Yoann Rodière <yoann@hibernate.org>
|
If we're going to touch this stuff, we should take the opportunity to bless the use of |
|
@sebersole Are you in favor of doing this one in JPA4? Or should we put it on ice for reconsideration as part of 4.1, where we're already considering other longstanding enhancements to converters (composite converters #105, and |
|
Like we discussed in chat, I'd be inclined to (also?) expose this on @Column(type=String.class)
UUID uuid;Which, granted, implies some level of implicit conversion. But you already called that out, and I don't think needs to be a huge set for the spec itself - providers could ofc provide extended set of conversions if they wish |
|
Yeah so I'm trying to think this through.
|
see #619