Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Partial fix for table store issues - updated writing of primitive values & dates #669

Merged
merged 1 commit into from Mar 21, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/util/edmtype.js
Expand Up @@ -52,7 +52,7 @@ exports.serializeValue = function (type, value) {
case 'Edm.Guid':
case 'Edm.String':
case null:
if (value) {
if (!_.isNull(value)) {
return value.toString();
}

Expand Down
4 changes: 3 additions & 1 deletion lib/util/odatahandler.js
Expand Up @@ -180,8 +180,10 @@ OdataHandler.prototype._writeAtomEntryValue = function (parentElement, name, val
var ignored = false;
var propertyTagName = name;

// Treat dates as primitives, not objects
if (!azureutil.stringIsEmpty(value) &&
_.isObject(value)) {
_.isObject(value) &&
!_.isDate(value)) {

if (!azureutil.objectIsNull(value[Constants.XML_VALUE_MARKER]) &&
!azureutil.objectIsNull(value[Constants.XML_METADATA_MARKER]) &&
Expand Down