This is a bug in the current implementation of the new PropertyValueCountTrigger in the new triggers module. See #991 for the fundamental cause; see #990 for a working demonstration of the failure.
Unfortunately, there doesn't appear to be a way to implement a simple property value count in client code outside of addressing #991. So in order to use this trigger we need to have some implementation outside of the triggers module in Ixa core, presumably in PropertyValueStoreCore<E, P>.
Some possibilities:
- Require any property you use with
PropertyValueCountTrigger to be IndexableProperty and use ValueCountIndex to implement. Not great because it counts all values, not just the value of interest. Ok when number of distinct values is small.
- Require any property you use with
PropertyValueCountTrigger to be IndexableProperty and implement a new single-value counter index. Properties could have many single value indexes, just like they can have many ValueChangeCountIndex instances (e.g. for daily, weekly incidence tracking).
- Implement a single-value counter index that doesn't require the property to be
IndexableProperty. This is tricky: you'd need to search for the count of the property value of index, which is fine if you have <~10 values of interest but degrades quickly.
This is a bug in the current implementation of the new
PropertyValueCountTriggerin the newtriggersmodule. See #991 for the fundamental cause; see #990 for a working demonstration of the failure.Unfortunately, there doesn't appear to be a way to implement a simple property value count in client code outside of addressing #991. So in order to use this trigger we need to have some implementation outside of the
triggersmodule in Ixa core, presumably inPropertyValueStoreCore<E, P>.Some possibilities:
PropertyValueCountTriggerto beIndexablePropertyand useValueCountIndexto implement. Not great because it counts all values, not just the value of interest. Ok when number of distinct values is small.PropertyValueCountTriggerto beIndexablePropertyand implement a new single-value counter index. Properties could have many single value indexes, just like they can have manyValueChangeCountIndexinstances (e.g. for daily, weekly incidence tracking).IndexableProperty. This is tricky: you'd need to search for the count of the property value of index, which is fine if you have <~10 values of interest but degrades quickly.