Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA and static inner class, possible?

 
Caine Lai
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe someone has an idea how to do this. I want to collect some statistics using JPA and return them all as a value object to my web tier.

In my value object I have a static inner class I would like to use for the JPA query. Is this possible?

My Class:


And here is the method I am trying to execute:


The error:
org.hibernate.hql.ast.QuerySyntaxException: Unable to locate class [vo.stats.vendor.GeneralVendorStatsVO.StatusCounts]

I don't know why this would not work, when I can do:


Any ideas? Thanks!
 
Caine Lai
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So to get around this issue I have resorted to having to do this:


Please tell me there is a better way...?

Thanks.
 
Emmanuel Bernard
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open a JIRA issue on our website. Looks like a bug.
 
Caine Lai
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Issue logged: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3655
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic