Map MySQL Point to GeoPoint

This commit is contained in:
Raymond Feng 2013-10-07 14:54:26 -07:00
parent 36884820fc
commit 9e2879201b
1 changed files with 7 additions and 0 deletions

View File

@ -294,6 +294,13 @@ MySQL.prototype.fromDatabase = function (model, data) {
case 'Boolean':
val = Boolean(val);
break;
case 'GeoPoint':
case 'Point':
val = {
lat: val.x,
lng: val.y
};
break;
}
}
data[key] = val;