Multiple beforeCreate callbacks


#1

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?


#2

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.


#3

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.