> fromDatabase: A boolean (default false). If true, then on class creation
> the database will be queried for the table's columns, and any missing
> columns (possible all columns) will be added automatically.
> I started with these
> class Company(SQLObject):
> class sqlmeta:
>         fromDatabase = True
>         lazyUpdate = False
>         cacheValues = True
>     Company_Name = StringCol(length = 256, default = None)
>     Company_Address = StringCol(length = 256, default = None)
>     Company_Phone = StringCol(length = 256, default = None)
>
> Added
> class Company(SQLObject):
> class sqlmeta:
>         fromDatabase = True
>         lazyUpdate = False
>         cacheValues = True
>     Company_Name = StringCol(length = 256, default = None)
>     Company_Address = StringCol(length = 256, default = None)
>     Company_Phone = StringCol(length = 256, default = None)
>     *Company_Number = StringCol(length = 256, default = None)*
>
> class Companys():
>     def __init__(self):
>          Company.createTable(ifNotExists = True, connection=conn)
>
>
>
Hi Jeremy,
what about the Naming Style?
see: Changing the Naming Style <http://sqlobject.org/SQLObject.html#id56>
.... By default names in SQLObject are expected to be mixed case in Python
(like mixedCase), and underscore-separated in SQL (like mixed_case). This
applies to table and column names.

Regards

Petr
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to