diff --git a/Cargo.toml b/Cargo.toml index ac6b2bcfc..228390181 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ log = { version = "^0.4", optional = true } rust_decimal = { version = "^1", optional = true } sea-orm-macros = { version = "^0.4.0", path = "sea-orm-macros", optional = true } sea-orm-types = { version = "^0.4.0", path = "sea-orm-types", optional = true } -sea-query = { version = "^0.19.0", features = ["thread-safe"] } +sea-query = { version = "^0.19.0", git = "https://github.com/SeaQL/sea-query.git", branch = "table-ref-db-prefix", features = ["thread-safe"] } sea-strum = { version = "^0.21", features = ["derive", "sea-orm"] } serde = { version = "^1.0", features = ["derive"] } serde_json = { version = "^1", optional = true } diff --git a/src/query/helper.rs b/src/query/helper.rs index 46f8c8959..a8d2448d2 100644 --- a/src/query/helper.rs +++ b/src/query/helper.rs @@ -433,8 +433,10 @@ pub(crate) fn unpack_table_ref(table_ref: &TableRef) -> DynIden { match table_ref { TableRef::Table(tbl) => SeaRc::clone(tbl), TableRef::SchemaTable(_, tbl) => SeaRc::clone(tbl), + TableRef::DatabaseTable(_, tbl) => SeaRc::clone(tbl), TableRef::TableAlias(tbl, _) => SeaRc::clone(tbl), TableRef::SchemaTableAlias(_, tbl, _) => SeaRc::clone(tbl), + TableRef::DatabaseTableAlias(_, tbl, _) => SeaRc::clone(tbl), TableRef::SubQuery(_, tbl) => SeaRc::clone(tbl), } }