On 4/19/2013 8:09 AM, W.S. Hager wrote:
> Hi Kris,
>
> Thanks for your elaborate answer. It really helps. What I'm not
> entirely clear on is when these functions get called. As I understand
> it, initializeRoot sounds like something that is meant to run only
> once, when the program is started in node.
Yes, that is correct.
> Other methods are clearly executed on each request, but according to
> my console there are other variants, e.g. when requesting a new model,
> specifically in persevere-example-wiki/app ->
> pinturaConfig.getDataModel. How does this work?
Yes, getDataModel gets called to return the root of your data model, so
that can be called on each request. Generally you implement this as the
root part of your application (in app.js), to define your full data
model. You could use ModelsModel or createModelsFromModel to create
meta-models in your implementation in getDataModel.
Thanks,
Kris