on 2022 Jul 13 2:34 PM
Hi all,
the june notes for cds 6 included the following:
"Legacy CQN syntax for representation of values for IN
operator
where: [..., 'IN', { val: [1,2,3] }]
isn’t supported anymore → use:where: [..., 'IN', { list: [{val:1},{val:2},{val:3}] }]
instead"In my application I'm using string literals and noticed the following behavior after the update to cds 6:
// is now returning all values, so it's ignoring the IN condition
SELECT.from(Object).where`userId IN ${aUserIDs}`
// will result in an exception when running the query
SELECT.from(Object).where`userId IN ${aUserIDs} and type = 3`
I therefore switched to the fluent API syntax (not sure if it's called like that):
SELECT.from(Object).where({userId: aUserIDs})
SELECT.from(Object).where({userId: aUserIDs, type: 3})
This way it's running fine again. But I wonder what is the correct syntax when using the template string literal syntax in combination with the IN operator?
Thanks & best regards
Nico
Hi nicorunge,
We double checked this problem, could you please try to write in in lowercase and let me know if it solves the problem?
SELECT.from(Object).where`userId in ${aUserIDs}`
Best regards,
Olena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.