when you set up a relationship, in most cases the "foreignkey" parameter refers to the column in join condition that actually contains a FOREIGN KEY constraint on it. by matching which table the foreignkey is on to the association of classes with those tables, the mapper figures out what kind of
I’m trying to represent a graph with nodes and edges…
For the nodes I’m using polymorphic single-table inheritance. The
relevant mapping & code is:
# Mapper classes:
#
# Project
#
# Node
# -> Algorithm
# -> Parameter
#
# Edge
# Project.nodes ->
Node
(->N)
#
2 matches
Mail list logo