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

Uri template parser doesn't work if key is Enum type #556

Closed
xuzhg opened this Issue May 6, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@xuzhg
Member

xuzhg commented May 6, 2016

Uri template parser doesn't work if the key is enum type.

Assemblies affected

OData .Net lib 6.15-beta.*

Reproduce steps

Build an entity type with enum type key. for example:

  <EntityType Name=""Shape"">
        <Key>
          <PropertyRef Name=""Color"" />
        </Key>
        <Property Name=""Color"" Type=""Fully.Qualified.Namespace.ColorPattern"" Nullable=""false"" />
      </EntityType>

Now, use uri template parser to parse:

~/Shapes({enumKey})

It will fail.

Expected result

Should parse into KeySegment with UriTemplateExpression as key value

Actual result

Throw exception.

@xuzhg xuzhg changed the title from Key Uri template doesn't if key is Enum type to Uri template parser doesn't work if key is Enum type May 6, 2016

xuzhg added a commit to xuzhg/odata.net that referenced this issue May 6, 2016

@LaylaLiu LaylaLiu added the in-progress label May 6, 2016

@xuzhg xuzhg self-assigned this May 17, 2016

@xuzhg xuzhg added this to the 6.16 milestone May 17, 2016

@xuzhg

This comment has been minimized.

Member

xuzhg commented May 17, 2016

Merged. Thanks.

@xuzhg xuzhg closed this May 17, 2016

@xuzhg xuzhg removed the in-progress label May 17, 2016

shaofengzhu added a commit to shaofengzhu/odata.net that referenced this issue Jun 10, 2016

chinadragon0515 added a commit to chinadragon0515/odata.net that referenced this issue Jul 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment