I have this scenario
@Entity
public class Entity1 {
@Id
private Long id;
private String str;
}
@Embeddable
public class Embed {
private String field1;
@ManyToOne
private Entity1 field2;
}
@Entity
public class Entity2 {
@Id
private Long id;
@Embedded
private Embed emb;
}
when I try to search like this:
DB.find(Entity2.class).where().eq("emb.field2.str", "foo")
I get an error that field2 doesn't contain `str"
Do I miss something?