Skip to content

Filtering on fields from @ManyToOne in @Embedded is not working #3677

@ghost81

Description

@ghost81

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions