Closed nicklee1990 closed 9 years ago
I just ran into this as well, haha. @nicklee1990 just verifying that your code does indeed return a properly subclassed object. Thanks!
Ah yes. That getRegisteredSubclass
method didn't exist in the SDK when I first wrote this, I had to add it and PR it. Go nuts if someone wants to PR a fix for this :)
PS, repository stuff is going to get quite a lot better sometime in the next month or so ;)
PR #35 implements this change. I've been using it in local development but could use it in production as well.
Thanks!
When using Create/Update methods in the repository, it returns a generic ParseObject. This prevents me from Type Hinting the object correctly when passing it to methods after creation e.g. say I create a new Sandwich, then I want to fire a new SandwichMade Event, I wouldn't be able to Type Hint the Sandwich in the Event constructor, I'd need to inject it as ParseObject $sandwich. A lunchtime example, but the fix I believe will be to change the Parse Abstract Repo to something along the lines of:
@HipsterJazzbo sound about right? I noticed this recently when I tried to pass the result of a create operation to my event. Looks as thought it was missing from #14