You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 of entityB objects.
Both entities have their own PostInitializer function registered. However the PostInitializer of entityB is called after the one of entityA, which means when the postInitiliazer method of entityA is fired, the collection of entityB object is null
postInitializer(metadataStore: MetadataStore) {
metadataStore.registerEntityTypeCtor(
'entityA',
entityA,
(data: entityA) => {
// trying to do things with data.entityB but it is null at this point.
});
}
After 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 ?
The text was updated successfully, but these errors were encountered:
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
?The text was updated successfully, but these errors were encountered: