Property name mismatch

org.hibernate.QueryException
Javadoc
A problem occurred translating a Hibernate query to SQL due to invalid query syntax, etc.
at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException
(source)

Typical Exception Messages

  1. could not resolve property: key1 of: component[val1,val2]
  2. could not resolve property: alumnoList of: pe.edu.upc.demo.domain.Alumno [From pe.edu.upc.demo.domain.Alumno a inner join fetch a.alumnoList]
  3. could not resolve property: class of: andersen.hibernatetest.Concrete2
  4. could not resolve property: DP of: com.cess.pojo.Customer
  5. could not resolve property: applyToPhoto of: org.yamj.core.database.model.ArtworkProfile
  6. could not resolve property: course_catalog of: com.companyname.model.Course
  7. could not resolve property: location.Longitude of: org.project.model.Event [select c from org.project.model.Event as c WHERE c.location.Longitude between :minLongitude AND :maxLongitude]
  8. could not resolve property FIRSTNAME (or fiRstName) of com.abc.Person
  9. could not resolve property: group_id of: com.example.User
  10. could not resolve property: userCount of: example.domain.UserAction

Specific cases

Solution

Mohd Salauddin, 1 month ago

In HQL queries you have to use the properties of the java class. E.g. if the entity class has property like lastName, use the same lastName in HQL , not last_name.

External results for this pattern (94)

  1. JWGmeligMeylingvia GitHub2 months ago
    could not resolve property: partner.id of: com.pallasathenagroup.entities.PartnerDiscountCode
    Show stack trace
  2. vlopezbovia GitHub3 months ago
    could not resolve property: reportId of: com.capgemini.adcenter.mirabaud.pocdrools.reportmanagement.dataaccess.api.ReportLineEntity
    Show stack trace
  3. sdelamovia GitHub3 months ago
    could not resolve property: IUserID of: demo.AG2T0005UserProd
    Show stack trace
  4. Tim Andersonvia JIRA3 months ago
    could not resolve property: notes of: org.openvpms.component.business.dao.hibernate.im.act.ActDOImpl [select rel.id from org.openvpms.component.business.dao.hibernate.im.act.ActRelationshipDOImpl as rel, org.openvpms.component.business.dao.hibernate.im.act.ActDOImpl as source, org.openvpms.component.business.dao.hibernate.im.act.ActDOImpl as target where (rel.archetypeId.shortName = :shortName0 and (source.archetypeId.shortName = :shortName1 and source.id = :id0) and target.archetypeId.shortName = :shortName2 and rel.source.id = source.id and rel.target.id = target.id) order by target.notes asc]
    Show stack trace
  5. Jorge Diazvia Liferay Issues3 months ago
    could not resolve property: barId of: com.example.model.impl.FooImpl [SELECT foo FROM com.example.model.impl.FooImpl foo WHERE foo.id.fooId = ? AND foo.groupId = ? ORDER BY foo.barId DESC]
    Show stack trace
  6. Pujan Shahvia Stack Overflow3 months ago
    could not resolve property: totalCount of: com.tsal.grms.dao.hibernate.entities.GrmsRequestInfo
    Show stack trace
  7. Rajeshvia Stack Overflow3 months ago
    could not resolve property: details.userProfile.type of: sg.com.ctc.eportal.core.entity.Access
    Show stack trace
  8. gene b.via Stack Overflow3 months ago
    could not resolve property: ID of: USER_T
    Show stack trace
  9. Cichyvia Stack Overflow3 months ago
    could not resolve property: id.player.name of: pl.andrzejcichon.criterionlazydatamodel.entities.Performance
    Show stack trace
  10. Etienne Morency-Bachand [X]via JIRA3 months ago
    could not resolve property: valueSetValue of: org.obiba.magma.datasource.hibernate.domain.ValueSetBinaryValue [delete from org.obiba.magma.datasource.hibernate.domain.ValueSetBinaryValue bv where bv.valueSetValue.id in (select vsv.id from org.obiba.magma.datasource.hibernate.domain.ValueSetValue vsv where vsv.valueSet.id in (select vs.id from org.obiba.magma.datasource.hibernate.domain.ValueSetState vs where vs.valueTable.id = :valueTableId))]
    Show stack trace