test: added tests for M2M relationships, it works

This commit is contained in:
2025-01-31 22:52:28 +01:00
parent 86e29fa2dc
commit b70b4b7a81
5 changed files with 93 additions and 5 deletions

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,