[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: 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: 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] 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 at

[sqlalchemy] Re: Advanced? mapping question

2008-10-22 Thread Michael Bayer
oh, ok. Here's a simplified case: from sqlalchemy import * from sqlalchemy.orm import * engine = create_engine('sqlite:///:memory:', echo=False) Session = sessionmaker(bind=engine) session = Session() metadata = MetaData() # this table contains the base data for a patient, like his name, phone

[sqlalchemy] Re: Advanced? mapping question

2008-10-22 Thread Hinrich Winther
On 21.10.2008, at 20:22, Michael Bayer wrote: > > There's a couple of odd practices here, and removing each one > individually may narrow down where things are going wrong. > > 1. What happens if you use the correct class, patient.op_ci_implant(), > instead of "chartitem" which does not match the

[sqlalchemy] Re: Advanced? mapping question

2008-10-21 Thread Michael Bayer
On Oct 21, 2008, at 11:33 AM, Hinrich Winther wrote: > > Hi, > > I have a problem that I can't figure out how to solve. I am really > hoping that somebody could point me in the right direction. > Here is my setup: > > patient_base_data = Table('Datenbestand', db.metadata, >