File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -51,15 +51,16 @@ class AutoPopulate:
51
51
@property
52
52
def key_source (self ):
53
53
"""
54
- :return: the relation whose primary key values are passed, sequentially, to the
55
- .make method when .populate() is called.
56
- The default value is the join of the tables references by the primary key.
57
- Users may override to change the granularity or the scope of populate() calls.
54
+ :return: the query expression that yields primary key values to be passed,
55
+ sequentially, to the ``make`` method when populate() is called.
56
+ The default value is the join of the parent tables references from the primary key.
57
+ Subclasses may override they key_source to change the scope or the granularity
58
+ of the make calls.
58
59
"""
59
60
def _rename_attributes (table , props ):
60
61
return (table .proj (
61
62
** {attr : ref for attr , ref in props ['attr_map' ].items () if attr != ref })
62
- if props ['aliased' ] else table )
63
+ if props ['aliased' ] else table . proj () )
63
64
64
65
if self ._key_source is None :
65
66
parents = self .target .parents (primary = True , as_objects = True , foreign_key_info = True )
Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ class Table(QueryExpression):
55
55
_table_name = None # must be defined in subclass
56
56
_log_ = None # placeholder for the Log table object
57
57
58
- # These properties must be set by the schema decorator (schemas.py) at class level or by FreeTable at instance level
58
+ # These properties must be set by the schema decorator (schemas.py) at class level
59
+ # or by FreeTable at instance level
59
60
database = None
60
61
declaration_context = None
61
62
You can’t perform that action at this time.
0 commit comments