OData / OData/AspNetCoreOData

Org.OData.Core.V1.AutoExpand annotation has no effect

Open
#773 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

I attempted to auto expand a nav prop using the Org.OData.Core.V1.AutoExpand annotation without success. The app does not use a mode builder but rather constructs the IEdmModel from a CSDL file.

<EntityType Name="exampleEntity">
  <Property Name="exampleStructProp" Type="Edm.String" Nullable="false" />
  <NavigationProperty Name="exampleNavProp" Type="Collection(exampleNavEntity)" ContainsTarget="true">
    <Annotation Term="Org.OData.Core.V1.AutoExpand" Bool="true" />
  </NavigationProperty>
</EntityType>

I've also tried moving the annotation up to the entity and switching from inline to targeted annotation. These also had no effect.

Is there an additional setting/annotation needed before the AutoExpand annotation will get picked up?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied CSDL example and the path that constructs the IEdmModel, then trace how the Org.OData.Core.V1.AutoExpand annotation is read for navigation properties. Compare inline, entity-level, and targeted annotations and verify the expected expansion behavior; done means the annotation is honored or the required setting is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.