1602/jugglingdb — pull request #192 by robblovell (2013-01-17 20:27:45+00:00)
Title: Hasmany

I have added an "all()" method to the hasMany in abstract-class.js to support proper many to one relationships from the side of the association that has a collection of the other object.

I added to the hasmany unit test, but I am not familiar with how to run these tests so I commented out the test. Hopefully, someone else can get that working.

Testing was performed in a separate application. I used compound which uses jugglingdb as an ORM and made sure that the call works. See this issue report for output from the test: https://github.com/1602/jugglingdb/issues/166#issuecomment-12245787

I left in the find method because some projects may be using it, but it really makes no sense in the context of hasMany to have that in hasMany. Unless I am not seeing something, someone can enlighten me.

I have written the all() procedure so that if you wanted to do filtering or use limit, skip, and order, you can. To get all you would use object.all(null,c).