|
-
Hibernate, createCriteria and Jasper Report
Hi
I want to feed a Jasper Report with the join of two tables.
I am using hibernate.
My source code is like:
public List view_report()
{
success=false;
List results ;
try
{
Session session = HibernateFactory.getSession();
HibernateFactory.beginTransaction();
results = HibernateFactory.getSession().createCriteria(Payroll.class).setFetchMode("employee",FetchM ode.JOIN).list();
HibernateFactory.commitTransaction();
HibernateFactory.closeSession();
}
catch (Exception ex)
{
ex.printStackTrace();
return null;
}
return results;
}
Now when i run the Jasper Report, i get the error
java.lang.NoSuchMethodException: Unknown property 'empid'.
What should be done to correct this ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks