]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
exception message, [ticket:826]
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 22 Oct 2007 15:20:15 +0000 (15:20 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 22 Oct 2007 15:20:15 +0000 (15:20 +0000)
lib/sqlalchemy/orm/mapper.py

index 8b92e8b4e6926647cbb07cca458380437f9256aa..9ef2ff8f78056103cdfe8299d4fd46d86c27891f 100644 (file)
@@ -662,7 +662,7 @@ class Mapper(object):
             return
 
         if not self.non_primary and (self.class_key in mapper_registry):
-             raise exceptions.ArgumentError("Class '%s' already has a primary mapper defined with entity name '%s'.  Use non_primary=True to create a non primary Mapper, or to create a new primary mapper, remove this mapper first via sqlalchemy.orm.clear_mapper(mapper), or preferably sqlalchemy.orm.clear_mappers() to clear all mappers." % (self.class_, self.entity_name))
+             raise exceptions.ArgumentError("Class '%s' already has a primary mapper defined with entity name '%s'.  Use non_primary=True to create a non primary Mapper.  clear_mappers() will remove *all* current mappers from all classes." % (self.class_, self.entity_name))
 
         def extra_init(class_, oldinit, instance, args, kwargs):
             self.compile()