[PonyORM-list] ponyorm - how to use
王飞
gf0842wf at gmail.com
Wed Apr 2 02:35:04 UTC 2014
Thanks! I hope PonyOrm can develop better.
2014-04-01 17:30 GMT+08:00 Alexey Malashkevich <alexeymalashkevich at gmail.com
>:
> At this point Pony doesn't generate models from the database tables.
> However Pony can map entities to legacy databases.
> For this purpose you can use parameters "_table_", "column", "columns":
>
> class MyEntity(db.Entity):
> _table_ = "legacy_table"
> attr1 = Required(unicode, column="db_column1")
>
> Check the "Mapping customization" part in the Pony documentation for an
> example
> http://doc.ponyorm.com/entities.html#mapping-customization
> Let us know if you have any further questions.
>
> Regards,
> Alexey
>
>
> On Tue, Apr 1, 2014 at 8:01 AM, 王飞 <gf0842wf at gmail.com> wrote:
>
>> Hi! How can I use pony to generate a model from a legacy database?
>> Look forward to your reply.Thanks!
>>
>> _______________________________________________
>> ponyorm-list mailing list
>> ponyorm-list at ponyorm.com
>> /ponyorm-list
>>
>>
>
> _______________________________________________
> ponyorm-list mailing list
> ponyorm-list at ponyorm.com
> /ponyorm-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </ponyorm-list/attachments/20140402/39307e72/attachment.html>
More information about the ponyorm-list
mailing list