[jboss-user] [EJB 3.0] - Re: Problem with enum datatype
imranpariyani
do-not-reply at jboss.com
Mon Sep 17 16:53:15 EDT 2007
"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 this
String 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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085255#4085255
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085255
More information about the jboss-user
mailing list