1602 / jugglingdb

Multi-database ORM for nodejs: redis, mongodb, mysql, sqlite3, postgresql, arango, in-memory...
http://1602.github.io/jugglingdb/
2.05k stars 241 forks source link

enhancing toJSON and toObject to pump out cached relations, optionally #374

Closed mshick closed 10 years ago

mshick commented 10 years ago

I was finding it a little difficult to deal with getting my cachedRelations out to my api.

Here's an enhancement to toJSON / toObject to copy the relations onto the data object that gets output.