Re: [SQLObject] ForeignKey setters bug
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2005-09-13 08:24:58
|
On Mon, Sep 12, 2005 at 06:31:22PM +0400, Oleg Broytmann wrote: > Ian, there is the code in ._create(): > > # First we do a little fix-up on the keywords we were > # passed: > for column in self.sqlmeta.columnList: > > # If a foreign key is given, we get the ID of the object > # and put that in instead > if kw.has_key(column.foreignName): > kw[column.name] = getID(kw[column.foreignName]) > del kw[column.foreignName] > > because of which .set() gets different parameters in cases > Test(customer=cust, task=task) > and > Test.set(customer=cust, task=task) > > I'd like to remove that manipulation in the inner "if" (and fix the next > "if" after it). This allow to call setters for ForeignKeys in .set() called > from __init__()/_create(). Any opinion on this? The change seems rather big considering we are in beta... Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |