• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA Criteria API and EmbeddedIDs

 
Dominik Müller
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi together,

General Question:
How can i navigate to an Attribute of an embeddedID in an Entity using Criteria API?

Problem in Detail:
get a little problem here while trying to build up a query with the CriteriaAPI, maybe some experts are around here
Have a Entity with an Embedded ID, have a JPQL Query which works fine, but i can't geht it running over my prefered query Api:



JPQL Query, just goes over to the embedded ID ("id")


i try to "copy" this to the criteria Api:



Get the Error: "Caused by: java.lang.IllegalArgumentException: Not an managed type: class de.gedoplan.provs.projektmgmt.entities.MitarbeiterAufgabeId"
try something like adressing the path direct too (like: "...get("id.mitarbeiter") but the same problem.

thanks a lot
Dom
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you include the full exception stack trace.

What JPA provider are you using?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic