Permalink
Browse files

Fixed bug in saving attrRefArrays

  • Loading branch information...
dreampulse committed Mar 19, 2014
1 parent e76df3d commit 02cf2faf85a0e9cb2fc0dbfaa012ebccdd147a1b
Showing with 4 additions and 4 deletions.
  1. +1 −1 examples/example5/index.html
  2. +1 −1 lib/modelizer.js
  3. +2 −2 package.json
@@ -46,7 +46,7 @@
var app = angular.module('App', []);
app.controller('AppController', function ($scope) {
EntryModel.angular($scope);
$scope.entries = EntryModel.$all();
View
@@ -705,7 +705,7 @@ Model.prototype._addStore = function(obj) {
var refArray = doc[i];
for (var j=0; j<refArray.length; j++) { // über die einzelnen Elemente dieses Arrays
var ref = refArray[j];
if (ref !== undefined && ref.ref()._id !== undefined) { // wenn das referenzierte Object existiert und bereits gespeichert wurde
if (ref !== undefined && ref.ref !== undefined && ref.ref()._id !== undefined) { // wenn das referenzierte Object existiert und bereits gespeichert wurde
ref._reference = ref.ref()._id; // die reference id mit speichern
}
}
View
@@ -1,6 +1,6 @@
{
"name": "modelizer",
"version": "0.1.2",
"version": "0.1.3",
"description": "An ORM-Mapper with a shared model between client and server for MongoDB",
"main": "lib/modelizer.js",
"directories": {
@@ -43,5 +43,5 @@
"bugs": {
"url": "https://github.com/dreampulse/modelizer/issues"
},
"homepage": "https://github.com/dreampulse/modelizer"
"homepage": "http://modelizer.org"
}

0 comments on commit 02cf2fa

Please sign in to comment.