Quantcast
Channel: DreamFactory Forum - Latest posts
Viewing all articles
Browse latest Browse all 5028

Creating records using related data and obtaining their primary keys?

$
0
0

Hi @drewpearce thanks for the info. I'm trying this, but I'm not getting the child record. Have converted it to put the object in as a parameter object.

var stockNewParams = {

                resource: [],

                related: 'tblstocklinein_by_fk_stockID',

                fields: '*'
            };

            stockNewParams.resource.push(n);

            console.log(stockNewParams);

            SharedFactoryStock.StockNew().create(stockNewParams, stockNewSuccess, stockNewFailure);

And When I get a response back from the server it's just got the parent record ID and not the related tables ID.
I've also tried fields: as blank and fields as * and as id.


Viewing all articles
Browse latest Browse all 5028

Trending Articles