Re: [SQLObject] ForeignKey setters bug
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2005-09-13 15:29:32
|
Oleg Broytmann wrote: > 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... Yeah, I'm still figuring out what the change really means. What exactly are you proposing to change it to? -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |