Open graphicsxp opened 3 years ago
Good question! I don't know what determines the order of the postinitializers. Have you tried re-arranging the code that calls them?
I have tried that indeed. I changed the order in which they are registered in my registration-helper class (generated with breeze generator) and this had no effect at all. Anything else I could try ?
I have a postInitializer in my breeze entities and i've noticed that I'm running into an issue with this.
Let's say I have
entityA
which has a collection property ofentityB
objects.Both entities have their own PostInitializer function registered. However the PostInitializer of
entityB
is called after the one ofentityA
, which means when the postInitiliazer method ofentityA
is fired, the collection ofentityB
object is nullAfter that the postInitializer of entityB is called and after that the collection property on entityA is populated but it is too late at this stage to do any post-processing.
How can we force
entityB
to be initialized beforeentityA
?