Attached a testcase with @EmbeddedId and @IdClass annotations the first one works well with count criteria query, the second fails.
Attached a testcase with @EmbeddedId and @IdClass annotations the first one works well with count criteria query, the second fails.