]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
repair ancient and incorrect comment
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 12 Apr 2022 02:03:28 +0000 (22:03 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 12 Apr 2022 02:08:18 +0000 (22:08 -0400)
it referred towards _columntoproperty refering to
lists of MapperProperty.  this comment goes all the
way to pre 0.1 being released.   it's likely been
wrong for nearly all that time.

Change-Id: I71234ae58a6253249d92224356e38372e4aff148
(cherry picked from commit 8254e3a28a32b7097fb926a373c17c35d4ec1d57)

lib/sqlalchemy/orm/mapper.py

index b4130b91941028cd3c0680d79c09a04fd3e40824..ad68820125f4aea21f2e10810446de0d83c7e243 100644 (file)
@@ -1415,19 +1415,14 @@ class Mapper(
         )
 
     def _configure_properties(self):
-        # Column and other ClauseElement objects which are mapped
 
-        # TODO: technically this should be a DedupeColumnCollection
-        # however DCC needs changes and more tests to fully cover
-        # storing columns under a separate key name
+        # TODO: consider using DedupeColumnCollection
         self.columns = self.c = sql_base.ColumnCollection()
 
         # object attribute names mapped to MapperProperty objects
         self._props = util.OrderedDict()
 
-        # table columns mapped to lists of MapperProperty objects
-        # using a list allows a single column to be defined as
-        # populating multiple object attributes
+        # table columns mapped to MapperProperty
         self._columntoproperty = _ColumnMapping(self)
 
         # load custom properties
@@ -3618,6 +3613,7 @@ class _ColumnMapping(dict):
     __slots__ = ("mapper",)
 
     def __init__(self, mapper):
+        # TODO: weakref would be a good idea here
         self.mapper = mapper
 
     def __missing__(self, column):