Hi!
I have the following statement:
"select {user}.userID as {user.userId} from tuser {user},tglobaluser_role {gur}, trole {role} where {role}.roleid={gur}.roleid and {role}.name=:roleName and {user}.userID={gur}.userID"
After calling query.list() i've got:
java.sql.SQLException: Column 'GlobalUs1_1_' not found.
at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:2324)
at com.mysql.jdbc.ResultSet.getLong(ResultSet.java:1381)
at net.sf.hibernate.type.LongType.get(LongType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
at net.sf.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:352)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:203)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
at net.sf.hibernate.loader.Loader.list(Loader.java:941)
at net.sf.hibernate.loader.SQLLoader.list(SQLLoader.java:92)
at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3764)
at net.sf.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:52)
at ifx.cim.backend.facade.hibernate.BackendServicesImpl.findUsersByRole(BackendServicesImpl.java:255)
How can i select a full user from my user table. I have to use createSQLQuery, because i have to make union of 3 select statements (the other 2 selects are not there in the above example).
Any help appreciated....
|