"Diwaker Gupta" <[EMAIL PROTECTED]> writes:
> I realize this belongs to the SQLObject mailing list, but I'm throwing
> it out here in case anyone knows an answer. Does SQLObject constrain
> the column name used for a ForeignKey depending on the table it
> references? An example (from SQLObject documentation):
>
>>>> class Address(SQLObject):
> ...
> ... street = StringCol()
> ... city = StringCol()
> ... state = StringCol(length=2)
> ... zip = StringCol(length=9)
> ... person = ForeignKey('Person')
>
> Can I instead have:
> owner = ForeignKey('Person')
>
> The last time I tried, I got an error saying column owner_id does not
> exist in table Person. For MultipleJoins this isn't a problem though.
It doesn't.
I use it all the time. When I' doing some auditing I have
changedBy = ForeignKey('User', notNone = True)
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---