org.hibernate.QueryException: could not resolve property: occured of: xxx.ProcessStateEntity [SELECT s.occured FROM xxx.Pr ocessStateEntity s]

Hibernate JIRA | Cédric Chantepie | 9 years ago
  1. 0

    When binding property with @Column annotation arround corresponding getter query "cannot resolve property", whereas all other persistence features (EntityManager.{persist,find,...}) properly supports it. Just moving annotation to the private field fix this issue, but in some case you really want to mapped property from its getter and not from private (protected) field. Annotation binding (causing issue) : [...] class ProcessStateEntity { [...] @Column(name="col") public Calendar getOccured() { ... } [...] } Query exception : org.hibernate.QueryException: could not resolve property: occured of: xxx.ProcessStateEntity [SELECT s.occured FROM xxx.Pr ocessStateEntity s] at org.hibernate.persister.entity.AbstractPropertyMapping.propertyExcept ion(AbstractPropertyMapping.java:44) at org.hibernate.persister.entity.AbstractPropertyMapping.toType(Abstrac tPropertyMapping.java:38) at org.hibernate.persister.entity.AbstractEntityPersister.toType(Abstrac tEntityPersister.java:1358) at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElemen tType.java:279) at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:386) at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:566) at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:241) at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:188)

    Hibernate JIRA | 9 years ago | Cédric Chantepie
    org.hibernate.QueryException: could not resolve property: occured of: xxx.ProcessStateEntity [SELECT s.occured FROM xxx.Pr ocessStateEntity s]
  2. 0

    When binding property with @Column annotation arround corresponding getter query "cannot resolve property", whereas all other persistence features (EntityManager.{persist,find,...}) properly supports it. Just moving annotation to the private field fix this issue, but in some case you really want to mapped property from its getter and not from private (protected) field. Annotation binding (causing issue) : [...] class ProcessStateEntity { [...] @Column(name="col") public Calendar getOccured() { ... } [...] } Query exception : org.hibernate.QueryException: could not resolve property: occured of: xxx.ProcessStateEntity [SELECT s.occured FROM xxx.Pr ocessStateEntity s] at org.hibernate.persister.entity.AbstractPropertyMapping.propertyExcept ion(AbstractPropertyMapping.java:44) at org.hibernate.persister.entity.AbstractPropertyMapping.toType(Abstrac tPropertyMapping.java:38) at org.hibernate.persister.entity.AbstractEntityPersister.toType(Abstrac tEntityPersister.java:1358) at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElemen tType.java:279) at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:386) at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:566) at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:241) at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:188)

    Hibernate JIRA | 9 years ago | Cédric Chantepie
    org.hibernate.QueryException: could not resolve property: occured of: xxx.ProcessStateEntity [SELECT s.occured FROM xxx.Pr ocessStateEntity s]
  3. 0

    org.hibernate.Query could not resolve property when the property is there [Hibernate JPA]

    Stack Overflow | 4 years ago | Szajba
    org.hibernate.QueryException: could not resolve property: palacy  of: odwzorowania.Wywiad [select p from odwzorowania.Pacjent p join p.wizyty w join w.wywiad wy WHERE wy.palacy = 'tak' AND wy.tetno > 120]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate  Error in Algorithm using SDK 'could not resolve property'

    Oracle Community | 6 years ago | sivaram
    org.hibernate.QueryException: could not resolve property: premise of: com.splwg.domain.customerinfo.premise.PremiseGeographicLocation__ [select pgl.geographicValue from com.splwg.domain.customerinfo.p remise.PremiseGeographicLocation__ pgl where pgl.premise.id=:premiseId and pgl.geographicType.id=:pgeocd]
  6. 0

    What could be causing weird property resolving error when using Hibernate envers?

    Stack Overflow | 3 years ago | Vampnik
    org.hibernate.QueryException: could not resolve property: codeto of: citylist_AUD [select new list(ee, e) from citylist_AUD ee, ee.codeto.wes.Citylist_AUD e where ee.originalId.citylist_id = e.originalId.id and ee.originalId.Road_id = :Road_id and e.originalId.REV.id = (select max(e2.originalId.REV.id) from ee.codeto.wes.Citylist_AUD e2 where e2.originalId.REV.id <= :revision and e.originalId.id = e2.originalId.id) and ee.originalId.REV.id = (select max(ee2.originalId.REV.id) from road_city_AUD ee2 where ee2.originalId.REV.id <= :revision and ee.originalId.Road_id = ee2.originalId.Road_id and ee.originalId.citylist_id = ee2.originalId.citylist_id) and ee.REVTYPE != :delrevisiontype and e.REVTYPE != :delrevisiontype]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.QueryException

      could not resolve property: occured of: xxx.ProcessStateEntity [SELECT s.occured FROM xxx.Pr ocessStateEntity s]

      at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException()
    2. Hibernate
      AbstractEntityPersister.toType
      1. org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:44)
      2. org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:38)
      3. org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1358)
      3 frames
    3. Hibernate HQL/JP-QL Parser
      DotNode.resolve
      1. org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:279)
      2. org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:386)
      3. org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:566)
      4. org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:241)
      5. org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:188)
      5 frames