• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate HQL returns partial data?

 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to print the values of Members Tables.
I am able to print only Name value where as Password value is shown null.

---------------------------------
here is the code
------------------------------

List mems =session.createQuery("from Members m order by m.name asc").list();
Iterator iter = mems.iterator();
while (iter.hasNext())
{
Members members = (Members)iter.next();
System.out.println("members name is..."+members.getName());
System.out.println("members pswd is..."+members.getPassword());
}

------------------------------
members.hbm.xml
---------------------
<hibernate-mapping>

<class name="org.Members" table="MEMBERS">
<id name="id" column="ID">
<generator class="increment"/>
</id>

<property
name="name"
column="Name"/>

<property
name="password"
column="Password"/>

</class>

</hibernate-mapping>

------------------------
how can print the password value without using Object[] array.

Thanks
Sreenivas
[ September 11, 2007: Message edited by: sreenivas jeenor ]
 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
found the problem.Now its working.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what was your issue? It might help someone out later when they search and see your thread.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic