You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constartists=[30,29,28,27,26];constlimit=4;constresults=awaitthis.connection.execute(`select e0.id, e1.* from artist as e0 left join lateral ( select e2.* from tattoo as e2 where e2.artist_id = e0.id order by e2.id desc limit ? ) as e1 on e0.id = e1.artist_id where e1.artist_id in (?)`,[limit,artists],);
Create the following query:
selecte0.id, e1.*from artist as e0 left join lateral ( select e2.*from tattoo as e2 wheree2.artist_id=e0.idorder bye2.iddesclimit4 ) as e1 one0.id=e1.artist_idwheree1.artist_idin ('[30,29,28,27,26]')
Notice the quotes in the last clause where e1.artist_id in ('[30,29,28,27,26]')
Expected behavior
Should not embrace array into quotes.
Additional context
I'm not sure which version it changed the behavior.
This work correctly:
constartists=[30,29,28,27,26];constlimit=4;constresults=awaitthis.connection.execute(`select e0.id, e1.* from artist as e0 left join lateral ( select e2.* from tattoo as e2 where e2.artist_id = e0.id order by e2.id desc limit ? ) as e1 on e0.id = e1.artist_id where e1.artist_id in (${artists})`,[limit],);
selecte0.id, e1.*from artist as e0 left join lateral ( select e2.*from tattoo as e2 wheree2.artist_id=e0.idorder bye2.iddesclimit4 ) as e1 one0.id=e1.artist_idwheree1.artist_idin (30,29,28,27,26)
Versions
Dependency
Version
node
14.14.0
typescript
4.0.3
mikro-orm
4.2.3
your-driver
mysql
The text was updated successfully, but these errors were encountered:
Describe the bug
The next:
Create the following query:
Notice the quotes in the last clause
where e1.artist_id in ('[30,29,28,27,26]')
Expected behavior
Should not embrace array into quotes.
Additional context
I'm not sure which version it changed the behavior.
This work correctly:
Versions
The text was updated successfully, but these errors were encountered: