我正在使用休眠映射如下:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class entity-name="TestClass.TestClass" table="TestClass">
<id name="id" type="integer" unsaved-value="any">
<column name="TestClassId" not-null="true" />
<generator class="assigned" />
</id>
<array name="arrayProp " table="arrayProp ">
<key column="id" />
<index column="ordre" />
<element column="arrayItem" type="string" />
</array>
</class>
</hibernate-mapping>
现在我想检索存储在 arrayProp 中的元素,我写了这个查询:
select arrayProp from TestClass
我得到的只是:
Wrapped Exception: No data type for node: org.hibernate.hql.ast.tree.IdentNode
\-[IDENT] IdentNode: 'arrayProp' {originalText=arrayProp}
任何人都知道如何从 arrayProp 中检索数据,thanx 寻求帮助?