This content has been marked as final.
Show 4 replies
-
1. Re: Problem with enum datatype
Fabrizio Spataro Jun 27, 2007 11:40 AM (in response to Imran Pariyani)Please:
- Post your entity class
- Use HQL instead SQL
FABRYPROG -
2. Re: Problem with enum datatype
Imran Pariyani Sep 17, 2007 4:53 PM (in response to Imran Pariyani)"FabryProg" wrote:
Please:
- Post your entity class
- Use HQL instead SQL
FABRYPROG
I am not using HQL and am not mapping it to an entity ..
i am using a nativequery here and the query looks like thisString query = "SELECT DISTINCT type FROM card WHERE type IS NOT NULL ORDER BY type"; return this.manager.createNativeQuery(query.toString()).getResultList();
So if i get the entity then there is no problem since the enumerated column is mapped with
@Enumerated(EnumType.STRING)
is it possible to change the return type for a native query .. or somehow to tell ejb3 to map the enum type as string by default
Regards
Imran -
3. Re: Problem with enum datatype
Imran Pariyani Sep 19, 2007 1:28 PM (in response to Imran Pariyani)Well finally i figured it out.. applied a small patch to hibernate and build the source and replaced it with the original one ..
Well if any one is stuck with similar kinda problem just let me know and i will send over the patch ..
Regards
Imran -
4. Re: Problem with enum datatype
Andrew Rubinger Sep 19, 2007 1:45 PM (in response to Imran Pariyani)Maybe ask the guys over on the Hibernate Developer's forums if they think you've discovered a bug, and if you patch would be worthwhile in the codebase?
S,
ALR