Skip to content

Commit

Permalink
build testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraband committed Dec 12, 2013
1 parent 0f9ba5b commit 106e3f9
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 68 deletions.
2 changes: 1 addition & 1 deletion Breeze.Client/Intellisense/breeze.intellisense.js
@@ -1,4 +1,4 @@
// Generated on: Wed Dec 11 2013 23:17:23 GMT-0800 (Pacific Standard Time)
// Generated on: Thu Dec 12 2013 00:06:47 GMT-0800 (Pacific Standard Time)

intellisense.annotate(breeze.core, {

Expand Down
2 changes: 1 addition & 1 deletion Breeze.Client/Scripts/breeze.intellisense.js
@@ -1,4 +1,4 @@
// Generated on: Wed Dec 11 2013 23:17:23 GMT-0800 (Pacific Standard Time)
// Generated on: Thu Dec 12 2013 00:06:47 GMT-0800 (Pacific Standard Time)

intellisense.annotate(breeze.core, {

Expand Down
15 changes: 8 additions & 7 deletions Nuget.builds/Breeze.Client/content/Scripts/breeze.base.debug.js
Expand Up @@ -358,18 +358,19 @@ function __requireLibCore(libName) {
var window = this.window;
lib = window[libName];
if (lib) return lib;
if (window.require) {
lib = window.require(libName);
}
if (lib) return lib;
}
if (require) {
lib = require(libName);
return findWithRequire(window.require, libName);
}
lib = findWithRequire(require, libName);
} catch(e) {

}
return lib;

function findWithRequire(require, libName) {
if (!require) {return void 0;}
if (require.defined && !require.defined(libName)) {return void 0;}
return require(libName);
}
}

function __using(obj, property, tempValue, fn) {
Expand Down
10 changes: 5 additions & 5 deletions Nuget.builds/Breeze.Client/content/Scripts/breeze.base.min.js

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions Nuget.builds/Breeze.Client/content/Scripts/breeze.debug.js
Expand Up @@ -358,18 +358,19 @@ function __requireLibCore(libName) {
var window = this.window;
lib = window[libName];
if (lib) return lib;
if (window.require) {
lib = window.require(libName);
}
if (lib) return lib;
}
if (require) {
lib = require(libName);
return findWithRequire(window.require, libName);
}
lib = findWithRequire(require, libName);
} catch(e) {

}
return lib;

function findWithRequire(require, libName) {
if (!require) {return void 0;}
if (require.defined && !require.defined(libName)) {return void 0;}
return require(libName);
}
}

function __using(obj, property, tempValue, fn) {
Expand Down
@@ -1,4 +1,4 @@
// Generated on: Tue Dec 10 2013 17:16:50 GMT-0800 (Pacific Standard Time)
// Generated on: Thu Dec 12 2013 00:06:47 GMT-0800 (Pacific Standard Time)

intellisense.annotate(breeze.core, {

Expand Down
12 changes: 6 additions & 6 deletions Nuget.builds/Breeze.Client/content/Scripts/breeze.min.js

Large diffs are not rendered by default.

79 changes: 40 additions & 39 deletions Samples/CarBones/CarBones/Scripts/breeze.debug.js
Expand Up @@ -358,18 +358,19 @@ function __requireLibCore(libName) {
var window = this.window;
lib = window[libName];
if (lib) return lib;
if (window.require) {
lib = window.require(libName);
}
if (lib) return lib;
}
if (require) {
lib = require(libName);
return findWithRequire(window.require, libName);
}
lib = findWithRequire(require, libName);
} catch(e) {

}
return lib;

function findWithRequire(require, libName) {
if (!require) {return void 0;}
if (require.defined && !require.defined(libName)) {return void 0;}
return require(libName);
}
}

function __using(obj, property, tempValue, fn) {
Expand Down Expand Up @@ -1742,7 +1743,7 @@ var __config = (function () {
__config.typeRegistry[typeName] = ctor;
};

__config.stringifyPad = " ";
__config.stringifyPad = '';

function initializeAdapterInstanceCore(interfaceDef, impl, isDefault) {
var instance = impl.defaultInstance;
Expand Down Expand Up @@ -7616,10 +7617,9 @@ var EntityType = (function () {
};

proto._updateTargetFromRaw = function (target, raw, rawValueFn) {

// called recursively for complex properties
this.dataProperties.forEach(function (dp) {
// recursive call
// updateTargetPropertyFromRaw(target, raw, dp, rawValueFn);

var rawVal = rawValueFn(raw, dp);
if (rawVal === undefined) return;
var dataType = dp.dataType; // this will be a complexType when dp is a complexProperty
Expand Down Expand Up @@ -7659,9 +7659,17 @@ var EntityType = (function () {
}
}
});

// if merging from an import then raw will have an entityAspect or a complexAspect
var rawAspect = raw.entityAspect || raw.complexAspect;
if (rawAspect && rawAspect.originalValuesMap) {
targetAspect = target.entityAspect || target.complexAspect;
targetAspect.originalValues = rawAspect.originalValuesMap;
}

}



/**
Returns a string representation of this EntityType.
Expand Down Expand Up @@ -12140,11 +12148,12 @@ var EntityManager = (function () {
proto.exportEntities = function (entities, includeMetadata) {
assertParam(includeMetadata, "includeMetadata").isBoolean().isOptional().check();
includeMetadata = (includeMetadata == null) ? true : includeMetadata;

var exportBundle = exportEntityGroups(this, entities);
json = __extend({}, this, ["dataService", "saveOptions", "queryOptions", "validationOptions"]);
var json = __extend( json, exportBundle, ["tempKeys", "entityGroupMap"]);

var json = __extend( {}, exportBundle, ["tempKeys", "entityGroupMap"]);

if (includeMetadata) {
json = __extend(json, this, ["dataService", "saveOptions", "queryOptions", "validationOptions"]);
json.metadataStore = this.metadataStore.exportMetadata();
} else {
json.metadataVersion = breeze.metadataVersion;
Expand Down Expand Up @@ -12202,18 +12211,19 @@ var EntityManager = (function () {
var json = (typeof exportedString === "string") ? JSON.parse(exportedString) : exportedString;
if (json.metadataStore) {
this.metadataStore.importMetadata(json.metadataStore);
// the || clause is for backwards compat with an earlier serialization format.
this.dataService = (json.dataService && DataService.fromJSON(json.dataService)) || new DataService({ serviceName: json.serviceName });

this.saveOptions = new SaveOptions(json.saveOptions);
this.queryOptions = QueryOptions.fromJSON(json.queryOptions);
this.validationOptions = new ValidationOptions(json.validationOptions);
} else {
config.metadataVersionFn && config.metadataVersionFn({
metadataVersion: json.metadataVersion,
metadataStoreName: json.metadataStoreName
});
}
// the || clause is for backwards compat with an earlier serialization format.
this.dataService = (json.dataService && DataService.fromJSON(json.dataService)) || new DataService({ serviceName: json.serviceName });

this.saveOptions = new SaveOptions(json.saveOptions);
this.queryOptions = QueryOptions.fromJSON(json.queryOptions);
this.validationOptions = new ValidationOptions(json.validationOptions);

var tempKeyMap = {};
json.tempKeys.forEach(function (k) {
Expand Down Expand Up @@ -13545,19 +13555,17 @@ var EntityManager = (function () {

if (targetEntity) {
if (mergeStrategy === MergeStrategy.SkipMerge) {
entitiesToLink.push(targetEntity);
targetEntity = null;
// deliberate fall thru
} else if (mergeStrategy === MergeStrategy.Disallowed) {
throw new Error("A MergeStrategy of 'Disallowed' prevents " + entityKey.toString() + " from being merged");
} else {
var wasUnchanged = targetEntity.entityAspect.entityState.isUnchanged();
if (mergeStrategy === MergeStrategy.OverwriteChanges || wasUnchanged) {
entityType._updateTargetFromRaw(targetEntity, rawEntity, rawValueFn);
targetEntity.entityAspect.entityState = entityState;
entityChanged.publish({ entityAction: EntityAction.MergeOnImport, entity: targetEntity });
em._checkStateChange(targetEntity, wasUnchanged, entityState.isUnchanged());
} else {
entitiesToLink.push(targetEntity);
targetEntity = null;

}
}
} else {
Expand All @@ -13568,6 +13576,7 @@ var EntityManager = (function () {
targetEntity.setProperty(entityType.keyProperties[0].name, newTempKey.values[0]);

// fixup foreign keys
// This is safe because the entity is detached here and therefore originalValues will not be updated.
if (newAspect.tempNavPropNames) {
newAspect.tempNavPropNames.forEach(function (npName) {
var np = entityType.getNavigationProperty(npName);
Expand All @@ -13582,27 +13591,19 @@ var EntityManager = (function () {
// Now performed in attachEntity
// entityType._initializeInstance(targetEntity);
targetEntity = entityGroup.attachEntity(targetEntity, entityState);
if (entityChanged) {
entityChanged.publish({ entityAction: EntityAction.AttachOnImport, entity: targetEntity });
if (!entityState.isUnchanged()) {
em._notifyStateChange(targetEntity, true);
}
entityChanged.publish({ entityAction: EntityAction.AttachOnImport, entity: targetEntity });
if (!entityState.isUnchanged()) {
em._notifyStateChange(targetEntity, true);
}

}

if (targetEntity) {
targetEntity.entityAspect.entityState = entityState;
if (entityState.isModified()) {
targetEntity.entityAspect.originalValuesMap = newAspect.originalValues;
}
entitiesToLink.push(targetEntity);

}
entitiesToLink.push(targetEntity);
});
return entitiesToLink;
}

function promiseWithCallbacks(promise, callback, errorCallback) {
function promiseWithCallbacks(promise, callback, errorCallback) {

promise = promise.then(function (data) {
if (callback) callback(data);
Expand Down
2 changes: 1 addition & 1 deletion Samples/CarBones/CarBones/Scripts/breeze.intellisense.js
@@ -1,4 +1,4 @@
// Generated on: Thu Dec 05 2013 14:22:30 GMT-0800 (Pacific Standard Time)
// Generated on: Thu Dec 12 2013 00:06:47 GMT-0800 (Pacific Standard Time)

intellisense.annotate(breeze.core, {

Expand Down

0 comments on commit 106e3f9

Please sign in to comment.