Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

toJSON() fails on toData() when have a ReferenceProperty (Datastore api) #5

Description

@leite

here is the patch ...

\lib\google\appengine\ext\db\model.js
line: 357
/*
*/
Model.prototype.toData = function () {
var data = { key: this.key().toString() }
var properties = this.constructor.properties();
//
for (var i in properties) {
var prop = properties[i];

    if( typeof(this[prop.name])=='object' ){
        data[prop.name] = this[prop.name].toData();
    }else{
        data[prop.name] = this[prop.name];
    }

}
return data;

}
/**/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions