Cosium / spring-data-jpa-entity-graph

Spring Data JPA extension allowing full dynamic usage of EntityGraph on repositories
MIT License
476 stars 49 forks source link

@Embeddable attributes are ignored by the generator #143

Closed hugothomas closed 9 months ago

hugothomas commented 9 months ago

Hi,

I have following related tables:

@Entity
public class Product {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Access(value = AccessType.PROPERTY)
  private long id = 0;

  @Embedded private Tracking tracking;

  private String barcode;

  ....
}

@Embeddable
public class Tracking {
  @ManyToOne(fetch = FetchType.LAZY)
  private User modifier;

  @ManyToOne(fetch = FetchType.LAZY)
  private User creator;
}

GeneratedEntityGraph does not contains tracking relation.

With this pull request spring-data-jpa-entity-graph will be able to generate it.