tuomur / python-odata

A simple library for read/write access to OData services
MIT License
79 stars 59 forks source link

Navigation properties that go to Collections not reflected into model #13

Closed mdufrasne closed 7 years ago

mdufrasne commented 7 years ago

Navigation properties that go to a Collection are not reflected into model. Has anyone else observed this?

In my metadata doc:

<EntityType Name="TestResultType">
    <Key>
        <PropertyRef Name="id"/>
    </Key>
    <Property Name="id" Type="Edm.Int32" Nullable="false"/>
    <Property Name="name" Type="Edm.String"/>
    <Property Name="active" Type="Edm.Boolean" Nullable="false"/>
    <Property Name="description" Type="Edm.String"/>
    <Property Name="createdOn" Type="Edm.DateTimeOffset" Nullable="false"/>
    <Property Name="createdBy" Type="Edm.Guid" Nullable="false"/>
    <Property Name="lastUpdatedOn" Type="Edm.DateTimeOffset"/>
    <Property Name="lastUpdatedBy" Type="Edm.Guid"/>
    <NavigationProperty Name="createdByUser" Type="Entities.User"/>
    <NavigationProperty Name="lastUpdatedByUser" Type="Entities.User"/>
    <NavigationProperty Name="testResults" Type="Collection(Entities.TestResult)"/>
</EntityType>

blah

mdufrasne commented 7 years ago

Nevermind - I had the version of the project without the lstrip fix in metadata.py PS: Great library - it's been very useful to me. :-)