0

I need to specify the fetching behavior of the relation entity of the root entity I want to use spring data org.springframework.data.jpa.repository.EntityGraph annotation for that end specify graph right in repository above method. but when I write

 @EntityGraph(attributePaths = {“order(items(subitems))”}) List findOrder()

i am getting error that Unable to locate Attribute with the the given name [order(items(subitems))] on this ManagedType

Question: can I use somehow “order(items(subitems))” graph notation without using graph java API.

yaroslav prokipchyn
  • 472
  • 2
  • 8
  • 17

1 Answers1

0

Doesn't the following work for you?

@EntityGraph(attributePaths = "order.items.subitems")
List findOrder()
Christian Beikov
  • 15,141
  • 2
  • 32
  • 58