Skip to content
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

Problem with circular dependecies #28

Open
jacek-lapinski opened this issue Feb 23, 2018 · 1 comment
Open

Problem with circular dependecies #28

jacek-lapinski opened this issue Feb 23, 2018 · 1 comment

Comments

@jacek-lapinski
Copy link

I want to have a model with circular dependencies. Something like this:
Product
{
category: Category
}

Category
{
products: Product[]
}

I prepared this model using annotations and plain classes, but it generates incorrect metadata.
Type of navigation property products is Collection. It should be Collection(Product).

When I used previous version of your library it started to working ok.

Incorrect metadata for:
"odata-v4-mongodb": "^0.1.12",
"odata-v4-server": "^0.2.10"

Correct metadata for:
"odata-v4-mongodb": "^0.1.9",
"odata-v4-server": "^0.1.38"

Maybe I should generate my model using different approach? Can you help me?

@lazarv
Copy link
Contributor

lazarv commented May 10, 2018

Hi @jacek-lapinski,
this model is working as expected:
https://github.com/jaystack/odata-v4-server/blob/master/src/example/model.ts
Category EntityType includes <NavigationProperty Name="Products" Type="Collection(Northwind.Product)" Partner="Category"/>
How you implemented your model? How you used the decorators to annotate the OData types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants