Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Handling OData properties #19

Open
joshgav opened this issue Oct 12, 2014 · 2 comments
Open

Handling OData properties #19

joshgav opened this issue Oct 12, 2014 · 2 comments

Comments

@joshgav
Copy link
Contributor

joshgav commented Oct 12, 2014

We should consider how to make the libraries resilient to

  1. unexpected additional properties or
  2. missing metadata-specified properties.

The OData spec calls for clients to never fail when they find additional properties, as 1) minor version updates and 2) open types are allowed to add properties even without clients being aware of them. So for unexpected additional properties we should log that additional properties were received but not throw any error.

For missing metadata-specified properties:

  • If Key properties are missing we should throw an error immediately.
  • If non-Key properties are missing, perhaps we should only throw an error if/when that property is directly accessed?
@joshgav joshgav added this to the v1.0 milestone Oct 12, 2014
@joshgav joshgav modified the milestone: v0.9.0 Oct 28, 2014
@PabloZaiden
Copy link
Contributor

For (1) the library just ignores the extra properties, and the missing properties are deserialized with the default java value for each entity

@joshgav
Copy link
Contributor Author

joshgav commented Nov 11, 2014

So we're good on (1).

For (2), as I understand the spec the value should be set to null. Search for the word "null" in OData-Protocol.

@joshgav joshgav added this to the v0.10.0 milestone Nov 11, 2014
@joshgav joshgav removed this from the v0.10.0 milestone May 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants