Re: [sqlalchemy] Backref Fetch all Related Records Instead of Those Meeting the Search Criteria

2014-11-12 Thread
that. On Nov 12, 2014, at 12:30 AM, 翁哲 weng...@gmail.com javascript: wrote: Hi Michael, Thanks for your promote reply. And I did some experiments on it and seems the contains_eager helps me get exactly what I want, however it will lose effect whenever I committed the current session. I guess

[sqlalchemy] Backref Fetch all Related Records Instead of Those Meeting the Search Criteria

2014-11-11 Thread
Hi all, Recently I found an issue on using the back reference. Here a simple scenario. Table user (with primary key userId) and table event_registration (with two foreign keys, userid referencing the user table and eventId referencing the event table, as primary key). And we define the

Re: [sqlalchemy] Backref Fetch all Related Records Instead of Those Meeting the Search Criteria

2014-11-11 Thread
suggestions on this? Thanks! On Wednesday, November 12, 2014 11:53:23 AM UTC+11, Michael Bayer wrote: On Nov 11, 2014, at 5:37 PM, 翁哲 weng...@gmail.com javascript: wrote: Hi all, Recently I found an issue on using the back reference. Here a simple scenario. Table user (with primary key