Inhalte aufrufen

Profilbild

oData Expand Query

WebApi oData

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
2 Antworten zu diesem Thema

#1 Sherif Ahmed

Sherif Ahmed

    Advanced Member

  • Members
  • PunktPunktPunkt
  • 35 Beiträge

Geschrieben: 22 April 2019 - 16:45

Hello,

 

I'm try to expand the category in the product to get it's name like below:

 

http://demo.smartsto...gories/Category

 

but I'm getting an error says:

 

The query specified in the URI is not valid. Could not find a property named 'Category' on type 'SmartStore.Core.Domain.Catalog.ProductCategory'.

 

Is this an issue or by (your or oData) design?

 

Regards,


Sherif Ahmed

Software Engineer

Egypt


#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3799 Beiträge

Geschrieben: 23 April 2019 - 10:26

The category property does not have the DataMember attribute, that's why it is not expanded. I will add the missing attribute so that the above endpoint works correctly.


Marcus Gesing

Smartstore AG


#3 Sherif Ahmed

Sherif Ahmed

    Advanced Member

  • Members
  • PunktPunktPunkt
  • 35 Beiträge

Geschrieben: 24 April 2019 - 05:58

Thank you so much


Sherif Ahmed

Software Engineer

Egypt



Auch markiert mit einem oder mehrerer dieser Schlüsselwörter: WebApi, oData