why do I get Path expected for join when I use join key word in hql

前端 未结 2 1626
没有蜡笔的小新
没有蜡笔的小新 2021-02-10 19:25

I have the following HQL

String FIND_PRODUCT_CLASS_ID = \"SELECT pc.id FROM ProductClass pc\"+ 
\" JOIN ProductGroup pg ON pc.id = pg.productClassId\" +
\" JOIN         


        
2条回答
  •  爱一瞬间的悲伤
    2021-02-10 20:14

    We need to provide path in HQL query. That's the "Path expected for join" the exception is coming.

    change query something like below: Please edit as per use

    String FIND_PRODUCT_CLASS_ID = "SELECT pc.id FROM ProductClass pc"+ 
    " JOIN pc.ProductGroup pg " +
    " JOIN pg.Product p " +
    " JOIN p.ProductSub ps WHERE ps.id =:childProductSubId";'
    

    Please refer this.

提交回复
热议问题