Hibernates generates VARBINARY column with JPA @Enumerated annotation
Posted
by tran
on Stack Overflow
See other posts from Stack Overflow
or by tran
Published on 2010-04-11T17:14:30Z
Indexed on
2010/04/11
17:23 UTC
Read the original article
Hit count: 557
Hibernates is generating a VARBINARY column with JPA @Enumerated annotation. I'm using SQL Server 2005 w/ JTDS driver. The mapping is dirt simple:
@Basic
@Enumerated(EnumType.ORDINAL)
private MyEnum foo;
I would have expected Hibernate to generate an integer column? I've also tried EnumType.STRING (expecting a varchar column) with no success.
Note that my app works fine; the column type makes it hard to inspect the DB, and to issue adhoc SQL when poking at the database.
© Stack Overflow or respective owner