Open AlexAti opened 5 years ago
With this definitions:
(defentity user (table :users) (pk :userid) (entity-fields :userid) (many-to-many role :user_roles {:lfk :userid :rfk :roleid}) (has-many answer {:fk :userid})) (defentity role (table :role) (pk :roleid) (entity-fields :roleid))
The following works with korma 0.4.3 but not with korma 0.5.0-RC1:
(select user (with role))
Also, the output of (dry-run (select user (with role))) provides the following in 0.4.3:
(dry-run (select user (with role)))
dry run :: SELECT "users"."userid" FROM "users" :: [] dry run :: SELECT "role"."roleid" FROM "role" INNER JOIN "user_roles" ON "user_roles"."roleid" = "role"."roleid" WHERE ("user_roles"."userid" = ?) :: [1] => ({:userid 1, :role [{:roleid 1}]})
but the following in 0.5.0-RC1:
dry run :: SELECT "users"."userid" FROM "users" :: [] dry run :: SELECT "role"."roleid" FROM "role" INNER JOIN "user_roles" ON () :: [] => ({:userid 1, :role [{:roleid 1}]})
So the issue seems with how the following part is being handled:
(many-to-many role :user_roles {:lfk :userid :rfk :roleid})
I haven't found anything more concrete unfortunately.
+1
With this definitions:
The following works with korma 0.4.3 but not with korma 0.5.0-RC1:
(select user (with role))
Also, the output of
(dry-run (select user (with role)))
provides the following in 0.4.3:but the following in 0.5.0-RC1:
So the issue seems with how the following part is being handled:
I haven't found anything more concrete unfortunately.