Hi there! I have a master-detail entity. Since I do some post-processing work on the details before inserting the entity in the db, I added an 'after_insert' event where I do the extra stuff. One of the things I need is to make sure certain "details" have been selected by the user and in case he didn't I add some default values on his behalf, just like
master.detail.append(DetailCls(score=100, timestamp=datetime.datetime.now())) My problem is that the foreign key column in Detail does not get populated for my inserted details and an error is raised when flushing the entity to the db. My question is where exactly should I hook an action so that I can intercept the primary key and update the FK attribute for the details I added in the event. TIA, Mariano -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
