on 02-28-2023 1:13 PM
I am referring to URL:
https://cap.cloud.sap/docs/java/query-api
Please get back to me on the following feedback:
For EX,
I want to use below CQL to combine two columns into one column, and put into In statement. How can I do this?
Select.from(Test.class).where(t -> (t.id() + t.name()).in(["0001Test1","0002Test2"])
You can easily build a CDS view over your entity that combines both columns. The second link already shows (it's linking a bad practice in the performance modeling guide) that is not the best way to model your requirement. You will run into performance problems resulting in high CPU/memory costs.
As an alternative you you could introduce an additional column for the combined value to your entity. Then, you add a @before handler for your entity that takes both source elements and joins them to the resulting combined element.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.