0

I created a service using expanded entity set method. There were two entities in the entity model connected by association. I did not keep any referential constraint between them, but it worked.

Could anybody kindly explain me when is a referential constraint mandatory in SAP netweaver gateway?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
bodhi
  • 43
  • 1
  • 2
  • 8

1 Answers1

0

I had a discussion about this with one of my coworkers and i looked into the OData v2 specification and didnt find anything it being mandatory. Runtime wise (expanded entity in your example) it doesnt change anything from what i have seen so far. I just use it if i really have a superset of key properties in the depended entity, because this constraint gets written into the $metadata xml file. I had a discussion about with my coworker because they demanded a constraint on some association because else it wasnt able for them to mock data via a JS(or UI5?) mockserver. So i looked in the specification to see if i did something wrong but didnt find anything about it. so i think its optional, as generation via SEGW also doesnt seem to care wether its there or not. My advise would be to use it if it makes sense, else dont

mash
  • 183
  • 1
  • 6