Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infer collection_name from __table__
Model classes that have been defined in a declarative style are not guaranteed to have a `__tablename__` attribute. For example, if they have been declared in a hybrid style with an embedded table: class example(base): __table__ = Table(...) However even those declared just via a `__tablename_` will have a `__table__` attribute (created by the metaclass), so to infer the collection name in all cases we should use `__table__.name`.
- Loading branch information