-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: about component, how can i get all object?
PostPosted: Sat Sep 13, 2003 1:15 pm 
Newbie

Joined: Sat Sep 13, 2003 12:47 pm
Posts: 15
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);
    }


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 13, 2003 1:17 pm 
Newbie

Joined: Sat Sep 13, 2003 12:47 pm
Posts: 15
Hibernate 2.03 + Mysql 4.0 + Resin 2.1.10


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 13, 2003 1:18 pm 
Newbie

Joined: Sat Sep 13, 2003 12:47 pm
Posts: 15
Hibernate 2.03 + Mysql 4.0 + Resin 2.1.10 + SUN JSDK 1.41


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 13, 2003 1:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
disable the reflection optimizer for more info.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.