setParameter does not work with enums
-------------------------------------
Key: EJB-415
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-415
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.4.0.GA
Environment: Hibernate 3.3.1.GA, Oracle 9i
Reporter: ChB
Let's imagine the following scenario:
@Entity
public class SomeClass {
@Id
private int id;
@Enumerated(EnumType.ORDINAL)
private SomeEnum value;
...
}
And the following query
em.createQuery("select entity from SomeClass as entity where entity.value =
:pParam).setParam("pParam", SomeEnum.SOMEVALUE);
This causes hibernate to serialize the enum and write it down to the db, while I actually
expected it use the value of @Enumerated(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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira