Create new Fit relationship with fits that current fit is projected onto (see #90)

This commit is contained in:
blitzmann
2014-05-01 22:08:27 -04:00
parent 0c40aa7244
commit a2727d5f47

View File

@@ -65,5 +65,12 @@ mapper(Fit, fits_table,
primaryjoin = projectedFits_table.c.victimID == fits_table.c.ID,
secondaryjoin = fits_table.c.ID == projectedFits_table.c.sourceID,
secondary = projectedFits_table,
collection_class = HandledProjectedFitList),
# projectedOnto is not currently used and probably won't be
# It simply makes data clean-up easier. See GH issue #90
"_Fit__projectedOnto" : relation(Fit,
primaryjoin = fits_table.c.ID == projectedFits_table.c.sourceID,
secondaryjoin = fits_table.c.ID == projectedFits_table.c.victimID == fits_table.c.ID,
secondary = projectedFits_table,
collection_class = HandledProjectedFitList)
})