diff --git a/sqlalchemy_utils/functions/orm.py b/sqlalchemy_utils/functions/orm.py index 9006d87..6ebae55 100644 --- a/sqlalchemy_utils/functions/orm.py +++ b/sqlalchemy_utils/functions/orm.py @@ -10,24 +10,6 @@ from sqlalchemy.orm.mapper import Mapper from sqlalchemy.orm.util import AliasedInsp -def remove_property(class_, name): - """ - **Experimental function** - - Remove property from declarative class - """ - mapper = class_.mapper - table = class_.__table__ - columns = class_.mapper.c - column = columns[name] - del columns._data[name] - del mapper.columns[name] - columns._all_cols.remove(column) - mapper._cols_by_table[table].remove(column) - mapper.class_manager.uninstrument_attribute(name) - del mapper._props[name] - - def primary_keys(class_): """ Returns all primary keys for given declarative class.