15 May 17:21
Challenging relationship: many-to-many, custom join, mapped dictionary, can it work???
From: Allen Bierbaum <abierbaum <at> gmail.com>
Subject: Challenging relationship: many-to-many, custom join, mapped dictionary, can it work???
Newsgroups: gmane.comp.python.sqlalchemy.user
Date: 2008-05-15 15:23:02 GMT
Subject: Challenging relationship: many-to-many, custom join, mapped dictionary, can it work???
Newsgroups: gmane.comp.python.sqlalchemy.user
Date: 2008-05-15 15:23:02 GMT
I am trying to setup a many-to-many relationship for two tables where I would like to allow more natural access to the data using a dictionary interface. The exact usage is pretty complex to explain, but I have come up with a simple example that demonstrates the same concept. (there is a full code example at the end of the e-mail) The tables are: - Script: holds a code script to run - VarTypes: Type details for variables that can be used as input and output to the script The relationship is: - For each Script, there is a set of named variables. - Each variable has a type associated with it - Each variable can be either an input variable or an output variable What I want to allow in the end is something like this: script = Script() script.code = "test code" var1 = VarType() var2 = VarType() var3 = VarType() var4 = VarType() script.input_vars["in1"] = var1 script.input_vars["in2"] = var2 script.output_vars["out1"] = var3(Continue reading)
RSS Feed