findOne: result of fetching too many relations [DATAJPA-589] #976
Labels
in: core
Issues in core support
status: declined
A suggestion or change that we don't feel we should currently apply
type: bug
A general bug
oaktree opened DATAJPA-589 and commented
I have one main entity called
Report
. I have several entities connect toReport
with@ManyToMany
relations. The connection is done via extra table, i.e. with@JoinTable
annotation. Each relation is lazy. I have a function that fetches the report with all its relations. now, if i do fetch by fetch (i.e mark the function as@Transcational
and access to each one of the property) everything works as expected. But, if I doI get all the relations as well but one of the relation (that has been connected to another table NOT by primary key) is fetching 13823 times. This means that the length of
r.getProjects()
is 13823 of the sameProject
. I attaching here the source ofDomainSpecification.java
/Report.java
/Project.java
andKeyword.java
(the keyword is just to show an example for an entity that works good with this kind of fetching). Maybe one can throw some light on this issuesAffects: 1.6.1 (Dijkstra SR1), 1.6.2 (Dijkstra SR2)
Attachments:
The text was updated successfully, but these errors were encountered: