Hi,
I just cannot understand what's wrong here, so maybe you know some advise.
This error refers to both Apache Struts and Hibernate.
I have the following to easy queries:
(1) session.createQuery("FROM Person").list(); (2) session.createQuery(SELECT p.nachname FROM Person p).list();
"nachname" is declared in my mapping file and there is a getter/setter method for this property.
First of all, both queries don't make problems within hibernate itself and debugging has shown that it really returns result sets.
However, if I use (2) SELECT-statement, I always get the following error message:
No getter method for property nachname of bean xxx
But there is such a getter! And as mentioned, the version (1) does work without any problems.
Mapping documents:
from Person.hbm.xml:
.
.
.
<property name="nachname" column="nachname" type="java.lang.String" not-null="true" />
.
.
.
Name and version of the database you are using:
PostgreSQL 7.4
The generated SQL (show_sql=true):
select person0_.nachname as x0_0_ from personen person0_
Thanks for all of you who can help,
Georg
|