File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Hibernate Criteria, Projections and associations

Peter Wagner
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i have the following HQL and want to create an equivalent Criteria:

The generated SQL loooks like this and works as expected:

With Hibernate Criteria i tried this:

But Hibernate generates the follwogin SQL:

As you can see, the generated SQL for the "anrede1" association is not correct. My question is, how can i set a projection for an association inside my criteria? (("anrede1"),anrede1) doesn't work...)?

Thanks in advance.

Best regards,

I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic