Cosium / spring-data-jpa-entity-graph

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

Plural attributes targeting non persistent entities are missing from generated entity graphs #77

Closed austalakov closed 1 year ago

austalakov commented 1 year ago

What steps will reproduce the problem? Add an @ElementCollection field to any existing model class (such as Product in the test samples).

What is the expected output? The generated ProductEntityGraph can reference the @ElementCollection field

What happens instead? The generated ProductEntityGraph is missing the @ElementCollection field

Environment:

Link to an automated test demonstrating the problem: Adding the below code to an existing model class such as Product

  @ElementCollection
  @MapKeyColumn(name="name")
  @Column(name="value")
  @CollectionTable(name="properties", joinColumns=@JoinColumn(name="product_id"))
  Map<String, String> properties = new HashMap<>(); // maps from attribute name to value

Additional context I am not sure if this is actually a problem or even possible to fix - mostly looking for quidance.