Closed qasimshabbir closed 13 years ago
Hi,
Unfortunately, Paris and Idiorm don't currently have support for composite keys. You may be able to build the association by adding a method to your model which runs a query to select the related rows manually, but you probably won't be able to save any data in the related rows easily.
Hope this helps - you may need to use a more full-featured database library if you need support for more complex associations.
Jamie
Hi,
Thanks for your quick reply.
I really like your idea will use in some small projects. Thanks again for great work.
Regards -Q
On Sun, Mar 20, 2011 at 3:34 PM, j4mie < reply@reply.github.com>wrote:
Hi,
Unfortunately, Paris and Idiorm don't currently have support for composite keys. You may be able to build the association by adding a method to your model which runs a query to select the related rows manually, but you probably won't be able to save any data in the related rows easily.
Hope this helps - you may need to use a more full-featured database library if you need support for more complex associations.
Jamie
Reply to this email directly or view it on GitHub: https://github.com/j4mie/paris/issues/15#comment_894874
I have table which has composite primary key. How would I associate this table by using has_one function.
for e.g I have a product and product_description table. product_description contains multiple description with language information. But it create one-to-one association with product. product_description has product_id and language_id as composite primary key.