Project:
View Revisions: Issue #38512 | [ Back to Issue ] | ||
Summary | 0038512: OBQuery can fail using objects from OBContext as parameters | ||
Revision | 2018-05-10 09:26 by caristu | ||
Steps To Reproduce | 1) Apply the attached patch (obquery.diff) 2) Log-in 3) Open the About pop-up. The query fails, showing the following error trace: ERROR org.openbravo.erpCommon.ad_forms.About - Error captured: org.hibernate.MappingException: Unknown entity: org.openbravo.model.ad.system.Client at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:694) at org.hibernate.impl.SessionFactoryImpl.getIdentifierType(SessionFactoryImpl.java:781) at org.hibernate.type.EntityType.getIdentifierType(EntityType.java:560) at org.hibernate.type.EntityType.getIdentifierOrUniqueKeyType(EntityType.java:585) at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:130) at org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:67) at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:571) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1716) 4) Note that when building the same query (with the same parameter) using OBCriteria, it can be executed properly (see attached obcriteria.diff) |
||
Revision | 2018-05-10 09:25 by caristu | ||
Steps To Reproduce | 1) Apply the attached patch 2) Log-in 3) Open the About pop-up 4) Note that the query fails, showing the following error trace: ERROR org.openbravo.erpCommon.ad_forms.About - Error captured: org.hibernate.MappingException: Unknown entity: org.openbravo.model.ad.system.Client at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:694) at org.hibernate.impl.SessionFactoryImpl.getIdentifierType(SessionFactoryImpl.java:781) at org.hibernate.type.EntityType.getIdentifierType(EntityType.java:560) at org.hibernate.type.EntityType.getIdentifierOrUniqueKeyType(EntityType.java:585) at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:130) at org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:67) at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:571) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1716) |
Copyright © 2000 - 2009 MantisBT Group |