I'm not sure it will work with the default constructor. What's the point of making new instances if you're not filling it with information taken from the database ? The specification does not clearly say anything about it though.
If you look at your previous posts which contain the query, the code and the exception, they are completely contradicting each other. It becomes difficult to guess what's wrong. So PostRealCode and the actual exception stacktrace.
Joined: Oct 01, 2008
For simpliticity i posted that...Sorry for mis-understanding
Here is my HQL query select new com.CReport(cdtwk.name,cdtwk.cStartDate) " + " from CByDateWeek cdtwk where cdtwk.pk.cId
02:16:41,265 ERROR [PARSER] Unable to locate appropriate constructor on class [com.CReport] [cause=org.hibernate.PropertyNotFoundException: no appropriate constructor in class: com.CReport]
The @Temporal annotation is used to specify what level of precision you want with the Date type field. i.e. It allows you to specify whether you are interested only in the DATE part or only with the TIME part or both the date and the time (TIMESTAMP). So a @Temporal(TemporalType.DATE) tells that you are only interested in the Date part of the data stored in the column corresponding to this field.
subject: How to instabntiate the class through EJB QL