Querying Entity Log Attributes

I’m trying to display a specific field (that’s changed) from the Entity Log but am not sure how I do that. Following the docs, I have setup a datasource as below

<collectionDatasource id="logDs"
    <![CDATA[select i from sec$EntityLog i
    where i.entityId = :ds$customerDs 
    order by i.eventTs]]>
  <collectionDatasource id="logAttrDs"

My question, in the nested ds, how do I filter for an attribute that is named ‘status’ only?

p.s. I have looked in the corresponding attribute table, SEC_ENTITY_LOG_ATTR, but it is empty. So I’m guessing the CHANGES column is being parsed from SEC_ENTITY_LOG?


Hi Eddy,

You are right, EntityLogAttr instances are stored together with owning EntityLogItem. You can filter them out only by removing from the logAttrDs datasource programmatically. Use excludeItem() method in the postInit() or ready() method of your controller, and set allowCommit=“false” for the logDs datasource to ensure that changes won’t be committed.