hql:
select uservo from UserVO as uservo
1 errors occurred while listing (and calling getPathNames).
exception setting property value with CGLIB setter of eg.UserVO.?
xml:
Code:
<class name="eg.UserVO" table="USER">
<id name="id" type="long" unsaved-value="0">
<column name="ID" sql-type="INT(10)"/>
<generator class="identity"/>
</id>
<component name="authentication" class="cn.mBig.experience.vo.AuthenticationVO">
<parent name="authUser"/>
<property name="username">
<column name="USERNAME" not-null="true" unique="true" sql-type="VARCHAR(20)"/>
</property>
<property name="password">
<column name="PASSWORD" sql-type="VARCHAR(20)"/>
</property>
</component>
<property name="name">
<column name="NAME" sql-type="VARCHAR(20)"/>
</property>
<property type="int" name="gender">
<column name="GENDER" sql-type="TINYINT(1)"/>
</property>
<property type="date" name="birthday" column="BIRTHDAY"/>
<property name="homePhone">
<column name="HOMEPHONE" sql-type="VARCHAR(80)"/>
</property>
<property name="mobile">
<column name="MOBILE" sql-type="VARCHAR(40)"/>
</property>
<property type="timestamp" name="creationDate" column="CREATIONDATE"/>
<property type="timestamp" name="modificationDate" column="MODIFICATIONDATE"/>
<property type="long" name="modificationUid">
<column name="MODIFICATIONUID" sql-type="INT(10)"/>
</property>
<property type="long" name="creationUid">
<column name="CREATIONUID" sql-type="INT(10)"/>
</property>
<property name="officePhone">
<column name="OFFICEPHONE" sql-type="VARCHAR(80)"/>
</property>
<property type="int" name="loginNumber">
<column name="LOGINNUMBER" sql-type="INT(10)"/>
</property>
<property type="timestamp" name="lastLogin" column="LASTLOGIN"/>
<property name="lastIp">
<column name="LASTIP" sql-type="VARCHAR(20)"/>
</property>
<property name="email">
<column name="EMAIL" sql-type="VARCHAR(100)"/>
</property>
<many-to-one name="group" class="cn.mBig.experience.vo.GroupVO" cascade="none">
<column name="GROUP_ID" sql-type="INT(10)"/>
</many-to-one>
</class>
code:
Code:
List list = null;
UserVO user = null;
try {
Query q = dsession.createQuery("from UserVO as vo where vo.authentication.username = ? and vo.authentication.password = ?");
//q.setEntity(0,authentication);
q.setString(0,authentication.getUsername());
q.setString(1,authentication.getPassword());
list = q.list();
if (list.size() != 0) {
user = (UserVO) list.get(0);
}
}
catch (Exception e) {
throw new DAOException(e);
}