Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Property localized does not exist on SELECT type #257

Open
1 task done
mathewzile opened this issue Sep 29, 2024 · 0 comments · May be fixed by #274
Open
1 task done

[BUG] Property localized does not exist on SELECT type #257

mathewzile opened this issue Sep 29, 2024 · 0 comments · May be fixed by #274
Labels
bug Something isn't working

Comments

@mathewzile
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am trying to select translated data from the localized view of entities with the new db services introduced in cds v8. According to documentation/samples, we should be able to use SELECT.localized to redirect the read request to localized views of the entities. However the SELECT type does not have the localized property.

I am using @cap-js/hana db service.

Expected Behavior

SELECT.localized does not report type error

References

CAP Documentation (only mentioned in SQLite's page which introduced @cap-js/sqlite earlier): https://cap.cloud.sap/docs/guides/databases-sqlite#localized-queries
Samples: https://github.com/search?q=SELECT.localized+language%3AJavaScript&type=code

Versions

| @cap-js/asyncapi | 1.0.2 |
| @cap-js/cds-typer | 0.25.0 |
| @cap-js/cds-types | 0.6.5 |
| @cap-js/db-service | 1.12.1 |
| @cap-js/hana | 1.2.0 |
| @cap-js/openapi | 1.0.5 |
| @sap/cds | 8.2.3 |
| @sap/cds-compiler | 5.2.0 |
| @sap/cds-dk | 8.2.3 |
| @sap/cds-dk (global) | 8.2.3 |
| @sap/cds-fiori | 1.2.7 |
| @sap/cds-foss | 5.0.1 |
| @sap/cds-mtxs | 2.1.0 |
| @sap/eslint-plugin-cds | 3.0.5 |
| Node.js | v20.16.0 |
| home | C:\Users\Work\Downloads\cobalt\backend\node_modules@sap\cds |

Anything else? Logs?

image
Workaround that works for now is to do (SELECT as any)

@mathewzile mathewzile added the bug Something isn't working label Sep 29, 2024
@cap-js cap-js deleted a comment Oct 7, 2024
@stockbal stockbal linked a pull request Oct 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant