Skip to content

Commit

Permalink
Release version 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Burgov committed May 10, 2014
1 parent f1fc644 commit a2f4ded
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RRM",
"version": "2.2.1",
"version": "2.2.2",
"homepage": "https://github.com/SamsonIT/RRM",
"authors": [
"SamsonIT"
Expand Down
10 changes: 9 additions & 1 deletion build/rrm.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ var ObjectManager = function(proxyFactory) {
if (!(entityName in objectMap)) {
return null;
}

var schemaConstructor = entityClassMap[entityName].prototype.$schema.constructor;
var idProperty = 'id' in schemaConstructor ? schemaConstructor.id : 'id';

var map = objectMap[entityName];
for (var i in map) {
if (map[i].id == id) {
if (map[i][idProperty] == id) {
return map[i];
}
}
Expand Down Expand Up @@ -105,6 +109,10 @@ var ObjectManager = function(proxyFactory) {
this.loadPropertyValue = function(entity, name, value) {
var property = entity.$schema[name];

if (property === undefined) {
return;
}

entity.$raw[name] = value;
this.setPropertyValue(entity, name, property.transform(value, this, entity));
}
Expand Down
2 changes: 1 addition & 1 deletion build/rrm.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RRM",
"version": "2.2.1",
"version": "2.2.2",
"description": "Manage relations between entities in JavaScript",
"main": "build/rrm.js",
"scripts": {
Expand Down

0 comments on commit a2f4ded

Please sign in to comment.