bcavlin wrote:
Ok,
but what is then this example from hibernate doc?
Transaction tx = session.beginTransaction();
Query query = session.createQuery("select c from Cat as c where c.sex = :sex");
query.setCharacter("sex", 'F');
for (Iterator it = query.iterate(); it.hasNext();) {
Cat cat = (Cat) it.next();
out.println("Female Cat: " + cat.getName() );
}
tx.commit();
Returns and instantiates Cat class wholly. If you want return instance from LoginTable use forexample query like this:
"select aLoginTable from LoginTable as a LoginTable where..."
returns list or iterator to LoginTable objects.