test: added tests for M2M relationships, it works

This commit is contained in:
phundrak committed 2025-01-31 23:14:40 +01:00
1 parent 86e29fa2dc
commit b70b4b7a81
5 files changed
+93 -5

No files matched your search

+2 -4
View File
@@ -103,13 +103,11 @@ impl From<&M2MRelationshipComplete> for proc_macro2::TokenStream {
);
let entity = &value.entity;
let query = format!(
"
SELECT remote.*
"SELECT remote.*
FROM {} local
JOIN {} link ON link.{} = local.{}
JOIN {} remote ON link.{} = remote.{}
WHERE local.{} = $1
",
WHERE local.{} = $1",
value.local.table,
value.link.table,
value.link.from,