-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: Throw error if rows in limit is missing for expand, same as in limit() #858
fix: Throw error if rows in limit is missing for expand, same as in limit() #858
Conversation
@@ -421,6 +422,11 @@ class HANAService extends SQLService { | |||
} | |||
|
|||
if (parent && (limit || one)) { | |||
if (limit && limit.rows == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this also an issue for pg and sqlite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already handled in the super.limit
function, but was missing from the HANA specific expand limit
logic (code).
As mentioned in the description:
We already have a missing rows check for limit(), so i added the same here.
🤖 I have created a release *beep* *boop* --- <details><summary>db-service: 1.14.1</summary> ## [1.14.1](db-service-v1.14.0...db-service-v1.14.1) (2024-10-28) ### Fixed * deep delete for views ([#496](#496)) ([82154ef](82154ef)) * properly support `default`, `cds.on.insert` and `cds.on.update` for `UPSERT` queries ([#425](#425)) ([338e9f5](338e9f5)) * SELECT cds.hana.BINARY ([#870](#870)) ([33c3ebe](33c3ebe)) </details> <details><summary>sqlite: 1.7.5</summary> ## [1.7.5](sqlite-v1.7.4...sqlite-v1.7.5) (2024-10-28) ### Fixed * properly support `default`, `cds.on.insert` and `cds.on.update` for `UPSERT` queries ([#425](#425)) ([338e9f5](338e9f5)) </details> <details><summary>postgres: 1.10.2</summary> ## [1.10.2](postgres-v1.10.1...postgres-v1.10.2) (2024-10-28) ### Fixed * properly support `default`, `cds.on.insert` and `cds.on.update` for `UPSERT` queries ([#425](#425)) ([338e9f5](338e9f5)) </details> <details><summary>hana: 1.4.0</summary> ## [1.4.0](hana-v1.3.2...hana-v1.4.0) (2024-10-28) ### Added * Improve procedure metadata lookup logic ([#862](#862)) ([da629d9](da629d9)) ### Fixed * enable `cesu8` by default for `hdb` driver and encode entries streams ([#868](#868)) ([d85d7e6](d85d7e6)) * Include `binary` type with `varbinary` type in `hana-client` ([#871](#871)) ([f4d7caf](f4d7caf)) * nested functions in comparisons ([#861](#861)) ([f3fd254](f3fd254)) * properly support `default`, `cds.on.insert` and `cds.on.update` for `UPSERT` queries ([#425](#425)) ([338e9f5](338e9f5)) * SELECT cds.hana.BINARY ([#870](#870)) ([33c3ebe](33c3ebe)) * Throw error if rows in limit is missing for expand, same as in limit() ([#858](#858)) ([641c3b9](641c3b9)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Johannes Vogel <31311694+johannes-vogel@users.noreply.github.com>
OData requests like
$expand=xxx($skip=5)
currently fail, because rows is missing which causes a TypeError on HANA. We already have a missing rows check for limit(), so i added the same here.