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

Question: Using Alternate keys when inserting, updating entities #908

Open
swidz opened this issue Jun 18, 2023 · 0 comments
Open

Question: Using Alternate keys when inserting, updating entities #908

swidz opened this issue Jun 18, 2023 · 0 comments

Comments

@swidz
Copy link

swidz commented Jun 18, 2023

I wonder if it is possible to send POST (inserts) using alternate keys on navigation properties like this:

url: /api/data/v8.2/contacts
method: POST
body: {
	"firstname" : "john",
	"lastname" : "smith",
	"[email protected]" : "/accounts(blg_alternatekey='blg12345')"
}

I am currently using class model which is converted to dictionary by standard functionality so the json being generated is like this

url: /api/data/v8.2/contacts
method: POST
body: {
	"firstname" : "john",
	"lastname" : "smith",
	"[email protected]" : "/accounts(00000000-0000-0000-0000-000000000001)"
}

Would it be possible to still using class model but force to use alternate key instead of navigation property's entity key ?

Regards,
Sebastian

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

1 participant