this has also been reported at https://github.com/sqlalchemy/sqlalchemy/discussions/9666
On Fri, May 12, 2023, at 1:25 AM, Shane Holcombe wrote: > > From the digging around that I've done, it seems to be the ColumnLoader > strategy setup_query method sometimes has a value for 'c' of None where an > adapter is present but check_for_adapt is False. This is from the c = > adapter.columns[c] line. > This happens only when called from the JoinedLoader class, it seems the > _generate_row_adapter method returns a clauses object with a columns dict > that has all the keys from the underlying table, but some of the values are > None. > > All of this behaviour is fairly hard to get to happen however it seems to > occur after the warning "Loader depth for query is excessively deep; caching > will be disabled for additional loaders. Consider using the recursion_depth > feature for deeply nested recursive eager loaders." occurs. > This warning comes from a different part of the system where the base level > object, 'User', is very deeply nested, and on some later request to a > different part of the system, fetching a different 'User' relationship at a > less deep level triggers the above error. > In our use case we have some fairly deeply nested relationships, 6 or so > levels deep, however we never used selectinload or immediateload to my > knowledge so there is no way to change the recursion depth. we would need a reproduction case in order to see what this is about > > Any help on this would be fantastic, > Thanks, > Shane > > > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy/f6ee8641-0dc8-4eec-a79e-941ac3d814b9n%40googlegroups.com > > <https://groups.google.com/d/msgid/sqlalchemy/f6ee8641-0dc8-4eec-a79e-941ac3d814b9n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/a5f85728-b423-4eb3-9470-65bc12ccab6b%40app.fastmail.com.