1

According to http://jaydata.org/blog/release-notes, below "JayData 1.3.1 Interoperability Edition", there is an item titled "Auto-attach of included child objects"

In my code, i tried this:

        smarterpjs.localdb.Clientes
                .include('CondicionVenta')
                .include('ListaPrecios')
                .include('Vendedor')
                .include('Localidad')
                .single(function(c) {
                    return c.Oid === this.ID
                }, {
                    ID: e.model.Oid
                }, function(c) {
                    var item = smarterpjs.crearOrdenVenta();
                    smarterpjs.localdb.Clientes.attach(c);
                    item.Cliente(c);
                   ...
                });

Problem is that c.CondicionVenta has no context set after the call to attach.

If i try latter to save that "item", it tries to save a new "CondicionVenta", a new "ListaPrecios", a new "Vendedor", a new "Localidad" too, which are wrong.

So, my question is: is that Auto-attach of included child objects" working or not? I'm using v1.3.2

Javier Castro
  • 321
  • 3
  • 12

0 Answers0