[sqlalchemy] Re: foreign_keys question

2008-10-23 Thread az
On Tuesday 21 October 2008 16:41:29 Marin wrote: I am using SA to map existing tables from my database. I have mapped the whole database without using any foreign_key argument for the mapper properties. After adding 3 new tables with corresponding foreign keys, SA is forcing me to add the

[sqlalchemy] joins with limit offset

2008-10-23 Thread ershadul.hoque
journals table has id column ledgers table has journal_id column consider that: journals table is mapped in Class Journal(object): pass and similarly ledgers as : Class Ledger(object): pass Now i want to run this query ( it runs successfully in mysql): select * from (select * from

[sqlalchemy] Re: joins with limit offset

2008-10-23 Thread Michael Bayer
On Oct 23, 2008, at 8:58 AM, ershadul.hoque wrote: journals table has id column ledgers table has journal_id column consider that: journals table is mapped in Class Journal(object): pass and similarly ledgers as : Class Ledger(object): pass Now i want to run this query ( it

[sqlalchemy] Re: mapping of a tree structure

2008-10-23 Thread Michael Bayer
On Oct 22, 2008, at 6:27 PM, Wojciech Malinowski wrote: Hi, I've done a mapping of a (not typical) tree structure. It's not completed yet, but the work in progress can be seen here: http://wojciechmalinowski.com/tree.zip The idea was to make the model as simple as possible and do all the

[sqlalchemy] Re: Advanced? mapping question

2008-10-23 Thread Hinrich Winther
Hi, I have tried to implement all day now. The problem is, that the values of the parent chartItem are populated by sqlalchemy after a flush. But I would have to extract the value by the parent before a flush, otherwise the db complains becuause sqllite would also try to flush the child

[sqlalchemy] Re: Advanced? mapping question

2008-10-23 Thread Michael Bayer
On Oct 23, 2008, at 1:32 PM, Hinrich Winther wrote: Hi, I have tried to implement all day now. The problem is, that the values of the parent chartItem are populated by sqlalchemy after a flush. But I would have to extract the value by the parent before a flush, otherwise the db

[sqlalchemy] sql views - how?

2008-10-23 Thread az
hi i've no much idea about sql views, so i want to ask something. As i understand, views are sort-of virtual tables consisting of whatever a query structure may contain. So: 1) is it possible sql views to be created via SA in a more or less server-independent way? if issuing raw sql is the

[sqlalchemy] Re: sql views - how?

2008-10-23 Thread Michael Bayer
On Oct 23, 2008, at 3:40 PM, [EMAIL PROTECTED] wrote: hi i've no much idea about sql views, so i want to ask something. As i understand, views are sort-of virtual tables consisting of whatever a query structure may contain. So: 1) is it possible sql views to be created via SA in a more or