Hi,
Is the following named query workable in a mapping document?
Code:
<query name="com.classDAO.findBySubclass"><![CDATA[
from ?
]]>
</query>
I am using Hibernate 2.1.2.
I got the error:
Code:
[junit] Testcase: testAddDomainData(com.xesgc.domain.DomainTest): Caused an ERROR
[junit] 0
[junit] java.lang.ArrayIndexOutOfBoundsException: 0
[junit] at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:2005)
[junit] at com.mysql.jdbc.PreparedStatement.setString(PreparedStatement.java:1137)
[junit] at net.sf.hibernate.type.StringType.set(StringType.java:26)
[junit] at net.sf.hibernate.type.ClassType.set(ClassType.java:36)
[junit] at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:48)
[junit] at net.sf.hibernate.type.NullableType.nullSafeSet(NullableType.java:35)
[junit] at net.sf.hibernate.loader.Loader.bindPositionalParameters(Loader.java:674)
[junit] at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:713)
[junit] at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
[junit] at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
[junit] at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
[junit] at net.sf.hibernate.loader.Loader.list(Loader.java:941)
[junit] at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
[junit] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
[junit] at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
Thanx in advance.