[hibernate-issues] [Hibernate-JIRA] Created: (HHH-1978) HQL update inserts wrong value for enum
Lóránt Pintér (JIRA)
noreply at atlassian.com
Sat Aug 5 00:12:10 EDT 2006
HQL update inserts wrong value for enum
---------------------------------------
Key: HHH-1978
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1978
Project: Hibernate3
Type: Bug
Components: query-hql
Versions: 3.2.0.cr2
Reporter: Lóránt Pintér
I have an entity with an enumeration type property:
@Enumerated(value = EnumType.ORDINAL)
public SyncState getState() {
return state;
}
SyncState is an enum:
public enum SyncState {
NOT_STARTED, STARTED
}
If I use session.saveOrUpdate() and other persister methots, the enum is handled correctly, and 0 or 1 is inserted/updated into my table. Though if I use HQL to update a few rows in that table, strange values are stored there. The strange values are the last few bytes of the string "STARTED", so I assume a parameter binder thinks this is an EnumType.STRING, but it is an EnumType.ORDINAL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list