On 02/07/2017 02:21 AM, Oleg Broytman wrote:
>
>    'name' in SQLObject is a pythonic name of column; if you want to
> provide a database name it's called 'dbName':
>
> class User(sqlobject.SQLObject):
>
>     class sqlmeta:
>         table  = 'tbl_user'
>         idName = 'user_id'
>
>     user_section = sqlobject.ForeignKey('Section', dbName='user_section')
>
>    Also you have to know that translation from names to dbName's is
> performed by an instance of Style. See styles.py and
> tests/test_style.py. If you don't want to submit to default SQLObject
> style (which, among other things, adds '_id' to ForeignKey's) and don't
> want to provide dbName for every column you can create your own Style
> and override the default.
>

Got it ! Nice answer.

Thx

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to