chandransalem / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

InMemoryProducer should honor standard nullness #117

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In .NET there are value types and reference types. Value types could not have 
null value.

Generated feed metadata should use the same nullable notion by default.

Original issue reported on code.google.com by Eugene.P...@gmail.com on 10 Jan 2012 at 10:03

GoogleCodeExporter commented 8 years ago
Patch

Original comment by Eugene.P...@gmail.com on 10 Jan 2012 at 11:14

Attachments:

GoogleCodeExporter commented 8 years ago
Latest patch 
https://code.google.com/p/odata4j-patches/source/browse/Issue-117-add-nullable-i
nfo-for-default-types

Original comment by Eugene.P...@gmail.com on 13 Jan 2012 at 11:54

GoogleCodeExporter commented 8 years ago
Eugene, I'm not going to implement this patch as it is.  Afaik null is a valid 
value for odata/edm types.  Value types are a .NET concept only.  So we should 
not encode this into EdmSimpleType.

Happy to reconsider if you make it an optional feature of InMemoryProducer or 
find something otherwise in the spec.

Original comment by john.spurlock on 15 Jan 2012 at 9:36

GoogleCodeExporter commented 8 years ago
I think we could move to support Issue 121 instead (making Annotations for 
nullness).

Form the other hand, we could treat simple type as non-nullable (i.e. int, 
boolean, float, ...) and reference type as nullable (i.e. Integer, Boolean, 
String, ...)
This will not let me to have non-nullable String property...

Original comment by Eugene.P...@gmail.com on 16 Jan 2012 at 12:43