Re: [sqlalchemy] relationship with DeferredReflection raises NoForeignKeysError

2016-07-30 Thread bsdz
Yes, that worked - thanks! :) > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to

Re: [sqlalchemy] relationship with DeferredReflection raises NoForeignKeysError

2016-07-29 Thread Mike Bayer
name the COUNTRY_ID column in lower case in your mapping, all UPPERCASE means case sensitive and it will be quoted "COUNTRY_ID", and not match the case-insensitive country_id name in your actual schema. On 07/29/2016 03:29 PM, bsdz wrote: I did some further checking and realized deeper down

Re: [sqlalchemy] relationship with DeferredReflection raises NoForeignKeysError

2016-07-29 Thread Blair Azzopardi
I rechecked everything and I realised that the ForeignKey column is case sensitive. Thanks for your help! On 29 July 2016 at 17:58, Blair Azzopardi wrote: > Interesting. Yes each table was in a different schema in pre-simplified > code and I am using SQL server via pyodbc

Re: [sqlalchemy] relationship with DeferredReflection raises NoForeignKeysError

2016-07-29 Thread Mike Bayer
On 07/29/2016 12:27 PM, bsdz wrote: Hi I'm trying to use DeferredReflection to encapsulate my data model so that it can easily be instantiated for different environments. However, I am having trouble creating relationships with a NoForeignKeysError being raised. I am guessing it is because

Re: [sqlalchemy] relationship with DeferredReflection raises NoForeignKeysError

2016-07-29 Thread Blair Azzopardi
Interesting. Yes each table was in a different schema in pre-simplified code and I am using SQL server via pyodbc from Linux. I'll try and get a more complete test case shortly. On 29 Jul 2016 5:53 p.m., "Mike Bayer" wrote: > > > On 07/29/2016 12:27 PM, bsdz wrote: >

[sqlalchemy] relationship with DeferredReflection raises NoForeignKeysError

2016-07-29 Thread bsdz
Hi I'm trying to use DeferredReflection to encapsulate my data model so that it can easily be instantiated for different environments. However, I am having trouble creating relationships with a NoForeignKeysError being raised. I am guessing it is because the table metadata generation is being