JPA Criteria Query - How to implement Join on two tables to get desired result in single Query
I have 2 classes mapped with db Tables. Composite Primary Key Class : @Embeddable public class Pk implements Serializable, Cloneable { @Column(name = "dataId") private String dataId; @Column(name = "occurrenceTime") private Timestamp occurrenceTime; public String getDataId() { return dataId; } public Pk setDataId(String dataId) { this.dataId = dataId; return this; } public Timestamp getOccurrenceTime() { return occurrenceTime; } public Pk setOccurrenceTime(Timestamp occurrenceTime) { this.occurrenceTime = occurrenceTime; return this; } @Override public boolean equals(Object o) { if (this == o)