Properly rephrase
This commit is contained in:
parent
0f7dd2c8dc
commit
c5be06fb57
1 changed files with 3 additions and 2 deletions
|
|
@ -10,8 +10,9 @@ from velofy.db import meta
|
||||||
class AddressPixelAssociation(meta.Base):
|
class AddressPixelAssociation(meta.Base):
|
||||||
"""Association pattern between `Address` and `Pixel`.
|
"""Association pattern between `Address` and `Pixel`.
|
||||||
|
|
||||||
This approach is needed here mainly because it implicitly
|
A plain many-to-many relationship would only set `.address_id` and `.pixel_id`.
|
||||||
updates the `city_id` and `grid_id` columns.
|
This class also copies `.city_id` from the `Address` and `.grid_id` from
|
||||||
|
the `Pixel`, which the composite foreign keys need for their checks.
|
||||||
|
|
||||||
See:
|
See:
|
||||||
https://docs.sqlalchemy.org/en/stable/orm/basic_relationships.html#association-object
|
https://docs.sqlalchemy.org/en/stable/orm/basic_relationships.html#association-object
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue