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

Create returns empty EntityProxy #257

Closed
Monata opened this issue Nov 6, 2023 · 3 comments
Closed

Create returns empty EntityProxy #257

Monata opened this issue Nov 6, 2023 · 3 comments
Assignees

Comments

@Monata
Copy link

Monata commented Nov 6, 2023

Hi, I'm having problems with the creation. After I use create_entity I would like to get the objectID of the newly created object. When I looked into the source code I saw that it's the expected behavior, however I'm ending up with an empty EntityProxy instance that has None as its entity_key. Is there a configuration that I might need to change?

I'm using the creation as it's shown here and assigning the result of .execute() to a variable:

@phanak-sap
Copy link
Contributor

phanak-sap commented Nov 8, 2023

Hi @Monata, I am sorry but such generic issue is not actionable for me. I cannot even guess what is wrong on your side. I cannot infer what code you have failing and I know nothing about the odata service you are running it against - most importantly its Odata protocol version (2 or different?) and the service $metadata - if the sample usage from documentation does not behave as expected.

But since you are having some code that is not behaving how you like, you should be able to post either sample failing unit test (use existing library test suite test_service_v2.py as inspiration) or provide reproducer script - ideally with the initialization from service metadata.xml (or reduced to some sample entityset+entitytype that is having problem).

Ideally I have something I can run locally. Failing new unit test would be ideal.

I am also missing information on what version of the pyodata you are reproducing this problem.

Refer for example to issue #249 and feel free to create PR to the repository with sample reproduction scripts: https://github.com/phanak-sap/pyodata-issue-files/tree/master

@phanak-sap phanak-sap self-assigned this Nov 8, 2023
@phanak-sap
Copy link
Contributor

Hi @Monata
is this still reproducible? If yes, please provide more info, as requested in previous comment of mine.

@phanak-sap
Copy link
Contributor

Hi @Monata I am closing this issue for inactivity, if still valid, please reopen with necessary informations.

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

No branches or pull requests

2 participants