diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-07-14 20:04:35 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-07-14 20:04:35 +0000 |
| commit | 44aa875212bfe01882f2a24bfb01cba833d3574b (patch) | |
| tree | 407831c4092496eec269019301cdd7b593fa3f8e /lib/sqlalchemy | |
| parent | 01bce5c129cacd8717510922ef63c3d40fe9381c (diff) | |
| download | sqlalchemy-44aa875212bfe01882f2a24bfb01cba833d3574b.tar.gz | |
- The "allow_column_override" flag from mapper() hasrel_0_5beta2
been removed. This flag is virtually always misunderstood.
Its specific functionality is available via the
include_properties/exclude_properties mapper arguments.
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/mapper.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index 172b99558..03db70394 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -82,7 +82,6 @@ class Mapper(object): inherit_foreign_keys = None, extension = None, order_by = False, - allow_column_override = False, entity_name = None, always_refresh = False, version_id_col = None, @@ -127,7 +126,6 @@ class Mapper(object): self.inherit_foreign_keys = inherit_foreign_keys self.extension = extension self._init_properties = properties or {} - self.allow_column_override = allow_column_override self.allow_null_pks = allow_null_pks self.delete_orphans = [] self.batch = batch @@ -717,10 +715,7 @@ class Mapper(object): mapped_column.append(mc) prop = ColumnProperty(*mapped_column) else: - if not self.allow_column_override: - raise sa_exc.ArgumentError("WARNING: column '%s' not being added due to property '%s'. Specify 'allow_column_override=True' to mapper() to ignore this condition." % (column.key, repr(prop))) - else: - return + raise sa_exc.ArgumentError("WARNING: column '%s' conflicts with property '%s'. To resolve this, map the column to the class under a different name in the 'properties' dictionary. Or, to remove all awareness of the column entirely (including its availability as a foreign key), use the 'include_properties' or 'exclude_properties' mapper arguments to control specifically which table columns get mapped." % (column.key, repr(prop))) if isinstance(prop, ColumnProperty): col = self.mapped_table.corresponding_column(prop.columns[0]) |
