org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=null,role=demo.B.c,tableName=c,tableAlias=c3_,origin=b b2_,columns={b2_.b_id ,className=demo.C}}]

tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    fetchJoin does not work without alias after updating Hibernate

    Stack Overflow | 5 months ago | Patrick Gotthard
    org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=null,role=demo.B.c,tableName=c,tableAlias=c3_,origin=b b2_,columns={b2_.b_id ,className=demo.C}}]
  2. 0

    JPA Criteria multiselect with fetch

    Stack Overflow | 6 months ago | Gazeciarz
    org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=generatedAlias1,role=com.sample.SampleModel.model.SampleModel.mentor,tableName=USER_,tableAlias=user1_,origin=SampleModel SampleModel0_,columns={SampleModel0_.MENTOR_ID ,className=com.sample.credential.model.User}}]
  3. 0

    how to select an object from a list which is an attribute of another object in a database with spring

    Stack Overflow | 3 years ago | Guizmoo03
    org.hibernate.QueryException: could not resolve property: Objectx of: com.domain.Objecty
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Cannot join fetch because the owner of the fetched association is not present

    Stack Overflow | 2 years ago | g00glen00b
    org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=f,role=org.xyz.Personnel.function,tableName=function_company,tableAlias=function1_,origin=personnel personnel0_,columns={personnel0_.code_function ,className=org.xyz.Function}}]
  6. 0

    Caused by: org.hibernate.QueryException: could not resolve property:

    Stack Overflow | 2 years ago | Drew1208
    org.hibernate.QueryException: could not resolve property: customer_id of: com.htd.domain.Po

  1. tfr 3 times, last 7 months ago

Root Cause Analysis

  1. org.hibernate.QueryException

    query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=null,role=demo.B.c,tableName=c,tableAlias=c3_,origin=b b2_,columns={b2_.b_id ,className=demo.C}}]

    at org.hibernate.hql.internal.ast.tree.SelectClause.initializeExplicitSelectClause()
  2. Hibernate
    QueryTranslatorImpl.doCompile
    1. org.hibernate.hql.internal.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:214)[hibernate-core-5.0.11.Final.jar:5.0.11.Final]
    2. org.hibernate.hql.internal.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:920)[hibernate-core-5.0.11.Final.jar:5.0.11.Final]
    3. org.hibernate.hql.internal.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:688)[hibernate-core-5.0.11.Final.jar:5.0.11.Final]
    4. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:673)[hibernate-core-5.0.11.Final.jar:5.0.11.Final]
    5. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:309)[hibernate-core-5.0.11.Final.jar:5.0.11.Final]
    6. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:257)[hibernate-core-5.0.11.Final.jar:5.0.11.Final]
    7. org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:262)[hibernate-core-5.0.11.Final.jar:5.0.11.Final]
    8. org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190)[hibernate-core-5.0.11.Final.jar:5.0.11.Final]
    8 frames