Re: [SQLObject] Foreign Key + Constraints?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Sidnei da S. <si...@aw...> - 2003-12-03 21:17:14
|
| >First, I'm getting the 'foreign' class via findClass(col.foreignKey), | >without passing the registry parameter, because AFAICT, I can't get to | >the SQLObject class from the column. Is that correct? How much trouble | >can that buy us? :) | | SOCol should get the foreign class, but not during instantiation | (because it's instantiated when the class is created, but the foreign | class may not be instantiated yet). There should be a function that | gets called in SOCol when the foreign class is created, and you should | set up anything you need then. The foreign class is only needed when postgresCreateSQL is called on the column. I can't really see where _registry is set, but it seems to be done on MetaSQLObject. If thats true, would it be fine to set and hold reference to the class on the column? Maybe having the column know the value of the class' _registry would be a better idea to avoid cyclic references? -- Sidnei da Silva <si...@aw...> http://awkly.org - dreamcatching :: making your dreams come true http://plone.org/about/team#dreamcatcher I wish you humans would leave me alone. |