GRDB.swift: Expression tree is too large (maximum depth 1000) with `including(all:)`
What did you do?
- When loading 1000+ objects from a series of joined tables via RxGRDB observeAll we are seeing SQL errors and a failure to produce the objects:
Expression tree is too large (maximum depth 1000) in "SELECT *, "id" AS "grdb_id", "opco" AS "grdb_opco" FROM "productPricingAppliedDiscount" WHERE ("customerId" = ?) AND ("opco" = ?) AND ((("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?)) OR (("id" = ?) AND ("opco" = ?))...
What did you expect to happen?
- The objects to be returned
What happened instead?
- SQL errors and no objects are pulled from the tables
Environment
GRDB flavor(s): (GRDB, SQLCipher, Custom SQLite build?) GRDB RxGRDB
GRDB version: GRDB 4.9.0 RxGRDB 0.18.0
Installation method: (CocoaPods, SPM, manual?) Cocoapods
Xcode version: Xcode 12.1
Swift version: 5.3
Platform(s) running GRDB: (iOS, macOS, watchOS?) iOS
macOS version running Xcode: 10.15.6
Demo Project
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (16 by maintainers)
Commits related to this issue
- Fix #871 — committed to groue/GRDB.swift by groue 4 years ago
- Fix #871 — committed to groue/GRDB.swift by groue 4 years ago
- Fix #871 — committed to groue/GRDB.swift by groue 4 years ago
- Fix #871 — committed to groue/GRDB.swift by groue 4 years ago
- Fix #871 — committed to groue/GRDB.swift by groue 4 years ago
- Fix #871 — committed to groue/GRDB.swift by groue 4 years ago
Thanks again for all your work!