Skip to content
Snippets Groups Projects
Commit db3a6d5c authored by felmer's avatar felmer
Browse files

SSDM-4920: Bug fixed by refreshing index instead of deleting attachment owner from index

SVN: 38048
parent 68341205
No related branches found
No related tags found
No related merge requests found
......@@ -325,7 +325,7 @@ final class AttachmentDAO extends AbstractGenericEntityDAO<AttachmentPE>implemen
hibernateTemplate.flush();
scheduleRemoveFromFullTextIndex(owner);
scheduleDynamicPropertiesEvaluation(owner);
if (operationLog.isInfoEnabled())
{
......@@ -347,16 +347,4 @@ final class AttachmentDAO extends AbstractGenericEntityDAO<AttachmentPE>implemen
.scheduleUpdate(DynamicPropertyEvaluationOperation.evaluate(entity.getClass(), Arrays.asList(entity.getId())));
}
}
protected void scheduleRemoveFromFullTextIndex(final AttachmentHolderPE owner)
{
// refresh the owner data in the index if the owner is a Sample or an Experiment
if (IEntityInformationWithPropertiesHolder.class.isAssignableFrom(owner.getClass()))
{
IEntityInformationWithPropertiesHolder entity = (IEntityInformationWithPropertiesHolder) owner;
persistencyResources.getDynamicPropertyEvaluationScheduler()
.scheduleUpdate(DynamicPropertyEvaluationOperation.delete(entity.getClass(), Arrays.asList(entity.getId())));
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment