Closed heartsentwined closed 10 years ago
Hmm App.__container__.lookup('session:main').find(App.Foo, 1);
should work actually. Most of the session methods check to see if the argument is a string. Not sure what the actual issue is here.
Thanks for your reply @ghempton, I'll do some more debugging on my side and see if I can isolate the problem. Just to note, #84 is reported based on observation from my same setup, so there's a chance that it's not epf's problem either...
I restarted the server, and it Just Worked. Not sure what happened. Sorry for this issue report.
EDIT: No, it doesn't work - see comment below.
On a side note, I created a barebones setup to test #84, and the reported behavior is independently observed. So it's not related to this setup.
Edit: I take that back. I didn't realize the ember
version has changed. When I put 1.0.0.rc8
back, the error pops up. git bisect
gives the same emberjs/ember.js@7c9e714 as the first breaking commit as #84.
Is this still an issue on the latest version of epf? Our app is running off of Ember.js master
Issue no longer present with
ember-source 1.0.0
epf-source 0.1.3
(gem versions)
I actually just bumped the version and cut another source gem.
Thanks! I'll test the new version later.
This throws an error:
This doesn't:
However, the former is called in the static
modelClass.find()
method, wherethis
- referring to the class itself - is passed intosession.find()
. Although epf prefers querying by string key lookup, the latter static support has been officially declared as part of epf in order to maintain compatibility of implicit ember behaviors.Either the
session.find()
call should be fixed to accept a polymorphic first argument (class or string), or themodelClass.find()
method should explicitly do a class-to-type conversion, and pass the string tosession.find()
. In the latter case, the docs should be updated to reflect that querying by class would not work.