Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude orm.Base functions from get_attributes #3

Closed
robertkeizer opened this issue Aug 10, 2013 · 3 comments
Closed

Exclude orm.Base functions from get_attributes #3

robertkeizer opened this issue Aug 10, 2013 · 3 comments

Comments

@robertkeizer
Copy link
Member

Currently the orm.Base.get_attributes function will iterate over itself. That is, it includes the attributes from __super__. It shouldn't

Add anther clause to the for key, value of (@) when iteration loop to get rid of functions that are not defined in the child class, but are in the parent.

@robertkeizer
Copy link
Member Author

sha: d6018ad has a simple solution for this. Not 100% elegant, but it will work for now.

Keeping this issue open though, since it really should be fixed properly.

@robertkeizer
Copy link
Member Author

This needs to be closed as of sha: 6802732. Now that orm.Base is extending events.EventEmitter it is also setting getters/setters for those objects.

@robertkeizer robertkeizer mentioned this issue Aug 12, 2013
@robertkeizer
Copy link
Member Author

Closing this ticket at the pull request above just finished it off. Running through Base.prototype catches both orm.Base.prototype and events.EventEmitter.prototype and the simple to_exclude list does the job elegantly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant