Re: [sqlalchemy] How to maintain a tight transactional scope whilst allowing lazy loading / attribute refreshing?

2018-03-06 Thread KCY
On Tuesday, 6 March 2018 21:12:01 UTC+1, Mike Bayer wrote: > > On Tue, Mar 6, 2018 at 2:52 PM, KCY > >> wrote: >> > First off thank you for the quick reply. I have seen those resources >> you >> > linked a few days ago and it guided me partially to my current ideas. >> The >> > RepositoryCont

Re: [sqlalchemy] How to maintain a tight transactional scope whilst allowing lazy loading / attribute refreshing?

2018-03-06 Thread Mike Bayer
On Tue, Mar 6, 2018 at 2:52 PM, KCY wrote: > First off thank you for the quick reply. I have seen those resources you > linked a few days ago and it guided me partially to my current ideas. The > RepositoryContext class is essentially the contextmanager example with some > extra helper methods. >

Re: [sqlalchemy] How to maintain a tight transactional scope whilst allowing lazy loading / attribute refreshing?

2018-03-06 Thread KCY
First off thank you for the quick reply. I have seen those resources you linked a few days ago and it guided me partially to my current ideas. The RepositoryContext class is essentially the contextmanager example with some extra helper methods. I think in trying to keep my example concise I lef

Re: [sqlalchemy] How to maintain a tight transactional scope whilst allowing lazy loading / attribute refreshing?

2018-03-06 Thread Mike Bayer
On Tue, Mar 6, 2018 at 5:14 AM, KCY wrote: > Context > > I'm currently designing the business and persistence layer that is going to > be used in various frontend applications (Web and standalone). To that end > I've been trying to reconcile ORM entities with a tight session scope but > I'm consta

[sqlalchemy] How to maintain a tight transactional scope whilst allowing lazy loading / attribute refreshing?

2018-03-06 Thread KCY
*Context* I'm currently designing the business and persistence layer that is going to be used in various frontend applications (Web and standalone). To that end I've been trying to reconcile ORM entities with a tight session scope but I'm constantly running into the same issues. For web I haven