PostProcessor doesn't get called if field value is not set
I created an annotation to set a field default value and a postprocessor that would check for null and return the default value from the annotation.
However it seems the postprocessor is only called if the field value is not null, defeating my attempt at returning a default value.
What would be the right way to implement something like this?
Re: PostProcessor doesn't get called if field value is not set
You can achieve this by using postprocessors. Postprocessors work the same way as preprocessors and are always invoked for a field. However, whether a postprocessor's "processValue" is called depends on a result of its "accepts" method. Make sure you implement it according to desired logic - in your case you should probably accept cases where value is not set on a field.
Support for default options is in our backlog but since it breaks a contract it will be done in Slice 5 release.