1602/jugglingdb — Issue #41: Fix results of zero-argument call to hasMany relationship
Author: contentfree
Created: 2012-03-01 19:22:31+00:00
State: open

Currently, an error is thrown ("Method only can be called with one or two arguments") when you try to call a hasMany without arguments. This is quite unintuitive.

If I have a User model that hasMany Post (as 'posts'), calling `user.posts()` seems like it should return all of the user's posts. My guess is that this is merely a factor of Juggling's newness but it does seem like it *should* work as expected.

I actually can't figure out how to synchronously load the related posts using `user.posts`. The `posts` object/function has the `_scope` property and there's a `find` property (that has a `find` and `destroy` method...?) but I can get no combination to work.