Closed spring-projects-issues closed 3 years ago
As answered in the referenced, internal Trello card: There was an issue with the domain mapping, the @Id
annotation was not correctly used, therefor the findById
derived method did not work.
With regards to the depth annotation: If an entity is already fully hydrated in the session cache, it will be used as is. The depth annotation is a mean to avoid traversing the whole graph. If the later has already been done, it is used.
umuzammil opened DATAGRAPH-1211 and commented
SDN 5.1.5. When we are trying to find node entity by id with usage “findById(4202L)” it returns empty optional. However when I execute “findAll()” I receive a proper result of all found entities. After that another call to “findById(4202L)” returns the entity as it should however it does not take into account the depth so execution of “findById(4202L)” and “findById(4202L, 2)” have the same result (nested objects are not populated). It looks like “findById” returns a cached result from “findAll”. What might be the issue here
Affects: 5.1.5 (Lovelace SR5)
Reference URL: https://trello.com/c/HSxtllxv/169-s3dxc-sdn-515-findbyid-does-not-take-into-account-the-depth