Comparing version 0.2.0 to 0.2.1
@@ -229,2 +229,10 @@ !function(){ | ||
, clone: function() { | ||
var clonedInstance = new (this._getDatabase()[this._defintion.model.name])(); | ||
} | ||
, save: function() { | ||
@@ -276,3 +284,3 @@ var callback = arg(arguments, 'function', function(){}) | ||
else { | ||
} | ||
@@ -323,3 +331,3 @@ }.bind(this)); | ||
var value = this._references[key] | ||
, column = this._columns[key].column;; | ||
, column = this._columns[key].column; | ||
@@ -333,3 +341,3 @@ | ||
if (err) next(err); | ||
else if (model) { | ||
else if (!model) { | ||
this[column.name] = null; | ||
@@ -336,0 +344,0 @@ next(); |
@@ -76,3 +76,7 @@ !function(){ | ||
} | ||
, toJSON: function() { | ||
return JSON.stringify(Array.prototype.slice.call(this)); | ||
} | ||
}); | ||
}(); |
{ | ||
"name" : "ee-orm" | ||
, "description" : "a simple yet powerful javascript orm for node.js supporting mysql & postgres" | ||
, "version" : "0.2.0" | ||
, "version" : "0.2.1" | ||
, "homepage" : "https://github.com/eventEmitter/ee-orm" | ||
@@ -34,2 +34,3 @@ , "author" : "Michael van der Weg <michael@eventemitter.com> (http://eventemitter.com/)" | ||
, "ee-mysql-connection" : "0.1.x" | ||
, "ee-postgres-connection" : "0.1.x" | ||
} | ||
@@ -36,0 +37,0 @@ , "optionalDependencies": {} |
18
test.js
@@ -21,5 +21,5 @@ | ||
while(i--) arr.push(1); | ||
log(orm); | ||
//log(orm); | ||
log.wtf('hui'); | ||
log.wtf('hajo jüfe'); | ||
/** | ||
@@ -42,7 +42,7 @@ // insert 1000 roles | ||
*/ | ||
/* | ||
orm.eventbox.venue.setMappingAccessorName('venue_media', 'media'); | ||
orm.eventbox.venue.setReferenceAccessorName('id_media', 'logo'); | ||
*/ | ||
//log(orm.eventbox.venue.getDefinition()); | ||
@@ -85,7 +85,7 @@ | ||
var transaction = orm.eventbooster.createTransaction() | ||
, query = transaction.user(['*']).limit(10).offset(0); | ||
var transaction = orm.eventbox.createTransaction() | ||
, query = transaction.event(['*']).limit(10).offset(0); | ||
/*query.getMapping('event_media'); | ||
query.getMapping('event_media'); | ||
@@ -97,3 +97,3 @@ query.getEventLocale(['subtitle', 'description']).getLanguage().filter({language: 'de'}); | ||
query.getSale(['*']); | ||
query.fetchMedia(['*']);*/ | ||
query.fetchMedia(['*']); | ||
@@ -111,3 +111,3 @@ | ||
//events.first().reload(); | ||
log(events); | ||
log(JSON.stringify(events)); | ||
/*events.forEach(function(event){ | ||
@@ -114,0 +114,0 @@ event.venues.forEach(function(venue){ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79095
12
2179
4