[sqlalchemy] Re: Deleted rowcount x does not match number of objects deleted y [PART 2]

2008-10-25 Thread Michael Bayer
yup. specifically with the session.delete() thing, by you saying parent.collection.remove(obj), you're doing the collection management yourself. delete(x) doesn't work since SQLA does not attempt to locate all the collections which "x" is a part of.It's a very common issue but we don

[sqlalchemy] Re: Deleted rowcount x does not match number of objects deleted y [PART 2]

2008-10-25 Thread jack2318
Hi Mike, Thanks. I learning SQA and I am trying to get the general feeling. I guess the idea is to use Python directly and Session take care of the SQL in the background. mOutOrder = mapper(dbOutOrder, tbl_outHeader, properties={'lines': relation(dbOutLine, cascade="all, delete-orphan")}) mOutLin

[sqlalchemy] Re: joins with limit offset

2008-10-25 Thread Michael Bayer
oops, sorry there was a bug there, its fixed in r5197. For an approach that will work with the current 0.5 release, you can join on a relation(). Assuming you have Journal.ledgers set up as a relation(Ledger), you can say: sess.query(Journal).limit(6).offset(2).from_self().join(Jo

[sqlalchemy] Re: joins with limit offset

2008-10-25 Thread ershadul.hoque
yep i am in v0.5 On Oct 25, 9:50 am, Michael Bayer <[EMAIL PROTECTED]> wrote: > hi - > > I'd have to create a test case to confirm this, but are you on 0.5   > latest ? > > On Oct 25, 2008, at 3:44 AM, ershadul.hoque wrote: > > > > > thanks a lot for your solution. But i have been caught by the >

[sqlalchemy] Re: joins with limit offset

2008-10-25 Thread Michael Bayer
hi - I'd have to create a test case to confirm this, but are you on 0.5 latest ? On Oct 25, 2008, at 3:44 AM, ershadul.hoque wrote: > > thanks a lot for your solution. But i have been caught by the > following error. Please help me. bye > > (OperationalError) (1054, "Unknown column 'journals

[sqlalchemy] Re: Advanced? mapping question

2008-10-25 Thread Michael Bayer
wow great, sorry you had to work so long on that ! On Oct 25, 2008, at 7:10 AM, Hinrich Winther wrote: > Hi Michael, > > Thank you so much! > It works like a charm. Damn, it is so wicked cool :) > > > On 23.10.2008, at 21:02, Michael Bayer wrote: > >> >> On Oct 23, 2008, at 1:32 PM, Hinrich Winth

[sqlalchemy] Re: Dynamic mapping strategy

2008-10-25 Thread Alex K
Hello Michael, JFYI - schema mapping approach worked fine, however I faced a new requirement to clear mappings in case if schema was altered (since I can not restart the web server), so I will try to clear partial mappers as you've suggested, Alex On 29 сент, 18:35, Alex K <[EMAIL PROTECTED]>

[sqlalchemy] Re: Advanced? mapping question

2008-10-25 Thread Hinrich Winther
Hi Michael, Thank you so much! It works like a charm. Damn, it is so wicked cool :) On 23.10.2008, at 21:02, Michael Bayer wrote: > > 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 char

[sqlalchemy] Re: joins with limit offset

2008-10-25 Thread ershadul.hoque
thanks a lot for your solution. But i have been caught by the following error. Please help me. bye (OperationalError) (1054, "Unknown column 'journals.id' in 'on clause'") u'SELECT anon_1.journals_id AS anon_1_journals_id, anon_1.journals_amount AS anon_1_journals_amount, anon_1.journals_entry_da