You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When selecting a non-root entity (e.g. query.select(root.get(child))) and child has a @ManyToOne reference with @BatchFetch(value=IN), the references of the children are not fetched. They are just null, even with fetchType=EAGER.
There is a simple test case attached with
three entity types with unidirectional (eager) many-to-one references (Record -> User -> Company)
User -> Company reference has @BatchFetch(value=IN)
EclipseLink version 4.0.2
When selecting a non-root entity (e.g.
query.select(root.get(child))
) and child has a@ManyToOne
reference with@BatchFetch(value=IN)
, the references of the children are not fetched. They are justnull
, even withfetchType=EAGER
.There is a simple test case attached with
@BatchFetch(value=IN)
query.select(query.from(Record.class).get("user"))
em.createQuery(query).getResultList()
returns users withcompany = null
@BatchFetch(value=IN)
, everything works as expectedeclipselink-batchfetch-selectnonroot.zip
The text was updated successfully, but these errors were encountered: