Joined: Fri Mar 26, 2004 9:23 am Posts: 3
|
Value object:
...
public class Xxx{
public java.sql.Date data;
public Xxx(java.sql.Date data){
this.data = data;
}
}
...
HQL:
...
select new Xxx(sc.data) from SomeClass sc
...
Exception:
1 errors occurred while listing (and calling getPathNames). net.sf.hibernate.PropertyNotFoundException: no appropriate constructor in class: Xxx
I'm sure sc.data is a java.sql.Date in the java code and in the mapping files (type=java.sql.Date)... the sql-type is timestamp and the database is Postgres. Writing and reading from the original class (SomeClass) works fine. If I change the the attribute data in Xxx to java.util.Date the HQL works...
Any Ideas ?
Thanks in advance,
Walter
|
|