Multiple beforeCreate callbacks


What happens when you have multiple beforeCreate callbacks implemented via mixing?

For example if I have the following type:

entity type MyTestType mixes CallbackTypeA, CallbackTypeB schema name 'MY_TEST_TYPE'

Where both CallbackTypeA and CallbackTypeB implement a beforeCreate function.

Would only A or B get called? Or both?


After some testing it seems that multiple beforeCreate functions can be defined and provisioned but only one will be called. For my test the first one defined was the one called but not sure if that is always the case.


I don’t think you should define things this way. I think you should define a hierarchy where CallbackTypeA mixes CallbackTypeB and in the implementation for CallbackTypeA, call c3Super as desired. Or something along those lines. But yes, I believe it will call it on the first type it finds it on. There is no support for it calling multiple callback functions by itself.