cancel
Showing results for 
Search instead for 
Did you mean: 

setFormKey causes extra query

ptrepagnier
Champ in-the-making
Champ in-the-making
If you create a task query, it looks like Activiti actually executes N+1 queries due to setFormKey in TaskEntity.  All of the other properties in TaskEntity have versions that do not cascade (e.g. setTaskDefinitionKeyWithoutCascade), but form key does not.  This causes each set of the form key property to query the ACT_HI_TASKINST table to check to see if form key has changed.  Is this by design?  Should I create a JIRA ticket for this?
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Very good catch indeed. No need to create jira ticket, I was so surprised this code was in there, I fixed it straight away: https://github.com/Activiti/Activiti/commit/155269558e8a99a23e9a3b8a36bdd10e25fd1023

Many thanks for posting this!