jarondl / pygtfs

A python (2/3) library for GTFS
MIT License
63 stars 44 forks source link

fix sqlalchemy warnings about foreign keys #44

Closed jarondl closed 6 years ago

jarondl commented 6 years ago

As mentioned in #32, sqlalchemy complains about foreign keys, for a good reason: They were in fact misconfigured.

This commit fixes the problem by specifying an explicit primary join to the relationships. To make things nicer, most of the relationships where moved from the "parent" to the "child". See: https://docs.sqlalchemy.org/en/latest/orm/join_conditions.html#overlapping-foreign-keys

jarondl commented 6 years ago

Also fixes #12