When the models are loaded inside the state?

Hi everyone,
I have defined a composed model (a CDM) and I prepared a view for that,
when I try to load the data I have an error related to not finding the model

message: ‘Expected document model ‘CustomModel-DM’ to be loaded.’

but as soon as I open a page that contains this model itself and come back to the other view (with load error) it opens the data as expected

I debugged frontend and I noticed the state object that has a list of models does not contain this model at first.

and also there is an object in state named ‘modelGraph’ it is also empty and it contains empty list of composeDocumentModels, documentModels and relationshipModel

I’m wondering if I have missed some configuration or I should do something else to have this model in state object.

I appreciate any help

Hi,
please see here about model loading in client: GetA12 Login

How does your appmodel look like for this view?

Regarding the model graph, please take a look at the docs here GetA12 Login.