Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use raiseload in query loading options
Use [raiseload](https://docs.sqlalchemy.org/en/14/orm/loading_relationships.html#sqlalchemy.orm.raiseload) loading technique in query options to raise an error on accessing attributes that haven't been eagerly loaded. There have been suboptimal SQL queries in sir previously due to missing columns in extrapaths or using hybrid attributes in fields or extrapaths which caused lazy loading. Since the attributes we access in SIR are fixed and remain the same, we should aim for loading all of those eagerly. raiseload will raise an error with a stacktrace to help us fix the issue if a lazy load happens, helping in performance debugging.
- Loading branch information