[rules-dev] JPAWorkingMemoryDbLogger.updateProcessLog uses hard coded query (likely hibernate specific)

jschmied nabble at juergenschmied.de
Wed Feb 9 02:20:52 EST 2011


in this function there is a hardcoded query string :

List<ProcessInstanceLog> result = getEntityManager().createQuery(
"from ProcessInstanceLog as log where log.processInstanceId = ? and log.end
is null")
.setParameter(1, processInstanceId).getResultList();

it gives the following error:
<openjpa-2.0.1-r422266:989424 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: "Encountered "from" at
character 1, but expected: ["DELETE", "SELECT", "UPDATE"]." while parsing
JPQL "from ProcessInstanceLog as log where log.processInstanceId = ? and
log.end is null". See nested stack trace for original parse error.

This should be a named query and put in orm.xml.

Thanks!

juergen

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/JPAWorkingMemoryDbLogger-updateProcessLog-uses-hard-coded-query-likely-hibernate-specific-tp2456782p2456782.html
Sent from the Drools - Dev mailing list archive at Nabble.com.


More information about the rules-dev mailing list