Re: [SQLObject] How do ForeignKeys work?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: paul <pa...@su...> - 2004-08-27 16:23:54
|
Thanks Ian, Ian Bicking wrote: > The bug is here: CA isn't defined (just like the exception says). Maybe > you mean self.CA.Type? That might not work either. I thought it worked like class vars and instance vars...(you see I don't know much about the inner workings of SQLObject ;) > In SQLObject in SVN you could do something like: > > def _create(self, id, **kw): > if kw['CA'].Type not in ['ca_' + kw['Type'], 'ca_root']: > raise ValueError, ... > super(Cert, self)._create(id, **kw) > > def _set_Type(self, value): > _value = ... > if value not in _valid: ... > if not self._SO_creating and self.CA.Type not in ...: > self._SO_set_Type(value) Will check this. thanks again, Paul |