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

Keys starting with an underscore are removed from the response #102

Open
johanmolen opened this issue Jan 26, 2022 · 5 comments
Open

Keys starting with an underscore are removed from the response #102

johanmolen opened this issue Jan 26, 2022 · 5 comments
Labels

Comments

@johanmolen
Copy link

johanmolen commented Jan 26, 2022

Is there a reason for removing keys which start with an underscore?
https://github.com/saintsystems/odata-client-php/blob/master/src/Entity.php#L701

Is there a way to override this behaviour?

@johanmolen
Copy link
Author

I think this behaviour is copied from Laravel. But this way odata keys starting with an underscore are removed :(

@johanmolen
Copy link
Author

Someone?

@itspoonmkohv
Copy link

This is an issue for me too - SAP S/4Hana Cloud API expands with underscore. So this library is currently not suitable for SAP Queries.

Here is an example for typical SAP query
/sap/opu/odata4/sap/api_product/srvd_a2x/sap/product/0001/Product?$top=50&$expand=_ProductDescription,_ProductPlant

@anderly anderly added the bug label Feb 4, 2022
@anderly
Copy link
Member

anderly commented Feb 4, 2022

@johanmolen, @itspoonmkohv yes, this is copied from Laravel Eloquent Model class. Confirming that there are no unintended consequences of removing this, but I think we'll be able to remove this to make it work.

@tavy315
Copy link
Contributor

tavy315 commented Feb 6, 2022

Perhaps laravel/framework#6630 helps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants