Gavin King
Gavin King
Closing in favor of https://github.com/hibernate/hibernate-orm/pull/9074.
The way I usually do this is: ```java PersistenceConfiguration config = new PersistenceConfiguration(); ... List.of(Book.class, Author.class, Publisher.class).forEach(config::managedClass); ``` which seems .... fine, I guess.
I guess the source of user confusion here is that usually `IntegerJavaType` will automatically do conversion from `String` to `Integer`. `EnumJavaType` doesn't do such a conversion, it assumes `String`s are...
Ah OK. I think this is slightly less than trivial to fix because as I said: > `EnumJavaType` doesn't actually properly know whether it is an `ORDINAL` or `STRING` enum...
> I think that persisting an oridnal enum into a varchar column is really an edge case I agree.
Excellent, thanks @dreab8 🙏
The most obvious way to do this is to let you write: ```java @Version int version = 1; ``` and I have a feeling Hibernate already lets you do that.
> Both of Hibernate and EclipseLink works fine, perhaps we should repurpose the issue to make this feature official That sounds good to me. > any non-negative integer initial value...
> timestamp version applies here too Yes, sure, I know.
+1, this would be a good thing to add.