[PonyORM-list] ponyorm - how to use

王飞 gf0842wf at gmail.com
Thu Dec 25 01:58:26 UTC 2014


hello
I didn't use foreign keys, but i want to associated query.
Because of many reasons, I cannot use foreign keys, so the 'Set' type can
be specified in a virtual foreign keys for associated query instead of real
foreign key?

2014-04-02 10:35 GMT+08:00 王飞 <gf0842wf at gmail.com>:

> 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/20141225/06c1bfba/attachment.html>


More information about the ponyorm-list mailing list