Simplified "boolean strategy" handling #3966
Replies: 5 comments 22 replies
-
I like |
Beta Was this translation helpful? Give feedback.
-
I like the idea, but only in addition to the possibility to of using
So overall, I favor the annotation approach for exposing builtin strategies. Users can still use custom types though. |
Beta Was this translation helpful? Give feedback.
-
Dunno. I guess I'm sorta not that keen on introducing an enum to model something that's in principle open-ended. I mean, yes, sure, for legacy reasons and convenience, we have these three built-in options, and that's OK as far as it goes, in that it's a pretty minimal API surface. But it's not like it's such a really super-excellent model that we should be freezing it into new constructs. (Also I don't think you would literally call it
That sounds like a better option to me. |
Beta Was this translation helpful? Give feedback.
-
I ended up doing both. I added 3
And an annotation form taking an enum with these 3 options:
This is all covered in the revamped basic-type section/chapter |
Beta Was this translation helpful? Give feedback.
-
@sebersole can this one be closed now? |
Beta Was this translation helpful? Give feedback.
-
We have support for storing a boolean in the domain model in multiple ways in the database. In addition to normal BIT/BOOLEAN storage, we also support Y/N, T/F and 1/0.
At the moment, to use any of these you have to explicitly use
@Type
to specify the mapping. E.g.I've been thinking it would be nice to have a simpler way to specify these. This might be an annotation
or maybe just publishing AttributeConverter impls for these cases.
WDYT?
Beta Was this translation helpful? Give feedback.
All reactions