[sqlalchemy] Autoload=True and schema changes

2010-10-11 Thread Sven A. Schmidt
Hi, I've got an issue which pops up from time to time with an SQLAlchemy based webservice application and it revolves around schema changes happening while an engine with autoload=True has been instantiated and is being used to start sessions. What happens is that someone on the team will make a

[sqlalchemy] Re: Autoload=True and schema changes

2010-10-11 Thread Sven A. Schmidt
a column when there's no DDL change to the table? I should really try and reproduce the problem first in a controlled environment to be sure I'm isolating the correct problem. Cheers, Sven On Oct 11, 6:12 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Oct 11, 2010, at 11:17 AM, Sven A. Schmidt

[sqlalchemy] Re: MySQL DATE_ADD function

2010-10-05 Thread Sven A. Schmidt
Hi Bryan, the only tricky bit in your SQL is the dangling 'DAY', because there's no operator to tie it to the rest. Otherwise you should be able to write (schema.AppDcRpe2 is just a Table object I'm using as an example): q =

[sqlalchemy] Re: Use regexp in like

2010-09-21 Thread Sven A. Schmidt
Michael, I hope I'm not misunderstanding what your trying to achieve, but isn't a combination of like and not like want you want to do here? As in: create table test ( t varchar2(255) ); insert into test values ('AA123'); insert into test values ('A0123'); select * from test where t like 'A%'

[sqlalchemy] Re: DDL and TypeError: 'dict' object does not support indexing

2010-08-30 Thread Sven A. Schmidt
Just wondering if it's any different if you try the tripe quote syntax For example in a similar case I use q = select os, count(os) from ( select distinct s.id, os from server s join instance_server ins on s.id =

[sqlalchemy] Re: mixed up relationships

2010-08-12 Thread Sven A. Schmidt
Carl, the formatting got a bit messed up but if I read your definition correctly you defined the relation as 'splits'. So you'd want to write trainingEffor.splits (lower case 's' in splits). -sas On Aug 12, 9:20 am, Bleve carl.i.bre...@gmail.com wrote: I'm using SQLAlchemy 0.6.3 on Python 2.6

[sqlalchemy] SAWarning: Got 'None' querying 'table_name' from all_cons_columns - does the user have proper rights to the table?

2010-08-10 Thread Sven A. Schmidt
Getting this out of the way first, because I always forget ;) : SQLAlchemy-0.5.5, Python 2.6 I'm getting the above error when trying to connect to an Oracle schema 'TEST' and read from another schema 'SAS' where tables are exposed via synonyms (permissions have been granted) and I'm hoping that

[sqlalchemy] Re: SAWarning: Got 'None' querying 'table_name' from all_cons_columns - does the user have proper rights to the table?

2010-08-10 Thread Sven A. Schmidt
the issue. I'll report back once I know more. Cheers, Sven On Aug 10, 3:44 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Aug 10, 2010, at 9:28 AM, Sven A. Schmidt wrote: Getting this out of the way first, because I always forget ;) : SQLAlchemy-0.5.5, Python 2.6 I'll take a look

[sqlalchemy] Re: SAWarning: Got 'None' querying 'table_name' from all_cons_columns - does the user have proper rights to the table?

2010-08-10 Thread Sven A. Schmidt
FKs were in place and I never needed to specify ForeignKey(...) Sorry for the noise, Sven On Aug 10, 4:10 pm, Sven A. Schmidt s...@abstracture.de wrote: Thanks, Michael. I wish I could update to 0.6.3 but unfortunately I'll have to stick with the deployed version of 0.5.5 for now. But in any

[sqlalchemy] Re: Oracle: There are multiple tables visible...

2009-06-24 Thread Sven A. Schmidt
2. no synonym parameter, schema = 'AINV_OWNER' on Table(...) Results in the error: Could not determine join condition between parent/child tables... I had expected this to work but it seems that for some reason SQLA doesn't see the constraint info on tables in another user's schema. Is

[sqlalchemy] Oracle: There are multiple tables visible...

2009-06-23 Thread Sven A. Schmidt
Hi, I've hit a problem very recently with autoloading of table info from an oracle schema which I believe is caused by a problem inside the _resolve_synonym method of oracle/base.py. I've googled around a bit but didn't find this issue reported previously. It may well be a problem with our db

[sqlalchemy] Re: Oracle: There are multiple tables visible...

2009-06-23 Thread Sven A. Schmidt
= 'AINV_OWNER' on Table(...) Results in the error: Could not determine join condition between parent/child tables... See 2) above. It seems I'm stuck between a rock and a hard place here ;) Cheers, Sven On Jun 23, 5:03 pm, Michael Bayer mike...@zzzcomputing.com wrote: Sven A. Schmidt wrote: Hi