Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82535

Retrieve Entity Offline

$
0
0

Hi everyone,

We have an offine app and are creating a widget. We have difficulty in retrieve objects from datasource. Let's say, in the model, we have

Entity1 (1)------->(*) Entity2

My questions are:

  1. How we can get all objects of Entity1

  2. Suppose we have an object as instance of Entity1, how we get objects of Entity2 connected to it.

So far, we try:

  mx.data.get({
                        aggregates: false,
                        count: true,
                        xpath: "//ModuleName.Entity1",
                        callback: function (results) {},
                        error: function () {
                        }
                    });

To get all object of Entity1, but it doens't work.

mx.data.get({
                        aggregates: false,
                        count: true,
                        xpath:"//Module.Entity2[ModuleName.E2_E1=\"objE1Id\"]",
                        callback: function (results) { },
                        error: function () {
                        }
                    });

or

  mx.data.get({
                        guid: objE1Id,
                        aggregates: false,
                        count: true,
                        path:"ModuleName.E2_E1",
                        callback: function (results) { },
                        error: function () {
                        }
                    });

But they don't work either.

Does anyone know answers for our questions?

Best regards


Viewing all articles
Browse latest Browse all 82535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>