forrestzhu / odata4j

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

InMemoryProducer creates redundant EntityId properties #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run an InMemoryProducer (e.g. InMemoryProducerExample after fixing issue 68).
2. Display metadata (e.g. 
http://localhost:8887/InMemoryProducerExample.svc/$metadata).

What is the expected output? What do you see instead?
For every <EntityType> there are two <Property>s with Name="EntityId". One with 
attribute Nullable="true", one with Nullable="false".

What version of the product are you using? On what operating system?
0.5.SNAPSHOT

Please provide any additional information below.
A possible fix would be to remove the implementation for method 
getPropertyNames() in class EntityIdFunctionPropertyModelDelegate. The existing 
implementation adds the idPropertyName (which always is "EntityId") to the 
returned list of properties. I don't think that this is intended, as the 
"EntityId" property is added within InMemoryProducer.createStructuralEntities() 
and InMemoryProducer.toOEntity() before the other properties are added.

Original issue reported on code.google.com by philipp.sebastian.thun on 15 Sep 2011 at 3:15

GoogleCodeExporter commented 8 years ago
Fixed in ra7559bed7940

Original comment by john.spurlock on 25 Sep 2011 at 8:38

GoogleCodeExporter commented 8 years ago

Original comment by john.spurlock on 6 Nov 2011 at 3:10