+1 from me as well.
Gail
- Original Message -
> From: "Hardy Ferentschik"
> To: "Steve Ebersole"
> Cc: "Hibernate Dev"
> Sent: Monday, July 20, 2015 12:37:43 PM
> Subject: Re: [hibernate-dev] Enum mapping in hbm.xml
>
> Hi,
>
>
Hi,
On Mon, Jul 20, 2015 at 05:36:30PM +, Steve Ebersole wrote:
> > As far as the default type, I don't feel that strongly. Like I said, to
> > me neither is a really compelling way to map enums; names are only slightly
> > better that ordinals imo. I am ok with the consistency aspect.
+1 f
https://hibernate.atlassian.net/browse/HHH-9955
On Mon, Jul 20, 2015 at 12:05 PM Steve Ebersole wrote:
> Well, first things first :)
>
> Does anyone disagree with making this a requirement to be fully expressed
> in the mapping? In other words, does anyone disagree fully resolving the
> "enum t
Well, first things first :)
Does anyone disagree with making this a requirement to be fully expressed
in the mapping? In other words, does anyone disagree fully resolving the
"enum type" (ordinal/name)
in org.hibernate.type.EnumType#setParameterValues?
This would mean getting rid of the hooks in
> On 19 Jul 2015, at 16:53, Steve Ebersole wrote:
>
> What I propose is that we change this. I am kind of torn as to the default
> tbh. I think JPA's default of ORDINAL is the wrong choice. I think NAMED
> is the better choice. Well technically I think an independent mapping code
> it best.
I should have mentioned... There is also this "type" parameter that
EnumType accepts. I'd also look at that in terms of deciding defaults. It
accepts JDBC type codes. EnumType already knows which type codes
constitute ordinal types and named types. So in psuedo code what I am
proposing is:
if
This came up in getting the testsuite set up against MySQL. When an enum
is defined in hbm.xml we do not inherently know whether to treat it as
ordinal or named. We try a few different things to make this
determination, but ultimately if we do not have enough information up front
we prefer to def