Open meuriceloup opened 3 years ago
In the meantime, I replaced the relationship [0..1] to [0..1] defined between User and UserAddress by a [1] to [1] relation. The error surprinsingly disappeared...
This problem is not blocking for me since I can slightly change the schema with 1 to 1 relation ;-)
Excellent, I'll leave the issue open, but now we can narrow it down easier. Thanks.
I did some digging, and cannot really reproduce. This is the log and compiled result (with the above TyphonML model), which looks ok:
REQ: from User u, UserAddress ua select u.@id where u.address == ua
NORMALIZED: from User u, UserAddress ua select u.@id where u.address == ua
ORDER: [<sql(),"RelationalDatabase">,<mongodb(),"DocumentDatabase">]
PLACEMENTS: {<<mongodb(),"DocumentDatabase">,"UserAddress">,<<sql(),"RelationalDatabase">,"User">}
COMPILING2SQL: from User u, #ignored(UserAddress ua) select u.@id where #needed(u.address == ua)
COMPILING2Mongo: from #dynamic(User u), UserAddress ua select #done(u.@id) where u.address == ua
Script: script([
step(
"RelationalDatabase",
sql(executeQuery("RelationalDatabase","select `u`.`User.@id` as `u.User.@id`, `junction_address$0`.`UserAddress.user` as `u.User.address` \nfrom `User` as `u` left outer join `User.address-UserAddress.user` as `junction_address$0` on (`junction_address$0`.`User.address`) = (`u`.`User.@id`)\n;")),
(),
signature=[
<"RelationalDatabase","u","User",["@id"]>,
<"RelationalDatabase","u","User",["address"]>
]),
step(
"DocumentDatabase",
mongo(find("DocumentDatabase","UserAddress","{\"_id\": \"${u_address_0}\"}","{\"_id\": 1}")),
("u_address_0":field("RelationalDatabase","u","User","address")),
signature=[]),
read([<"RelationalDatabase","u","User",["@id"]>])
])
Btw, just noticed you use id
and not @id
in the query, but this doesn't change the behavior on my machine.
Hi guys,
By testing random QL queries, I'm facing with strange errors: I would like to execute a join between two entities stored in different containers (one in MariaDB and the other one in MongoDB) but it returns an error...
This is my (reduced) schema:
This is my query:
And this is the returned error:
Did I miss something? Thanks in advance