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
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  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

    Getting Error when Fetching data of Object Type Column using Hibernate

    Coderanch | 4 years ago | Sapan Shah
    org.hibernate.QueryException: could not resolve property: local_value of: obj_hiber.Prices [ select a.mm.local_value,a.mm.mnemonic from obj_hiber.Prices as a]

    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