data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

[Known Issue]: Adding/updating Relationships is currently not supported in CosmosDB.

Open seekdavidlee opened this issue 2 years ago • 5 comments

I get the following message: "Adding/updating Relationships is currently not supported in CosmosDB." when trying to add a relationship using the dab update command.

I do realize this is not yet supported but wondering if this is planned to be supported soon and if not, where I can review in the code to help support this.

seekdavidlee avatar Jul 06 '23 17:07 seekdavidlee

Hi @seekdavidlee Thanks for the feedback, can you please provide the data model that you are using? , If you are referring to the relationship between two containers, currently it's a limitation and we don't support and there is no ETA. However you can follow our data modelling documentation to store the entities in the same container in an embedded format to achieve the same.

sajeetharan avatar Jul 07 '23 04:07 sajeetharan

Thanks for the suggestion @sajeetharan.

  • It may be helpful to update the message around not currently supporting Relationships to just not supported at all and maybe add a aka.ms link to a page that describes your workaround.
  • My other thought is that it may be worthwhile to consider building an abstraction on top of when we store entities in the same container to support the notion of Relationship in that context. I think this could also be applicable to Azure Table Storage if there is support for it in the future as well. Curious to hear your thoughts on this idea.

seekdavidlee avatar Jul 07 '23 13:07 seekdavidlee

Can we at least add this to the documentation? This limitation is not clear from the web docs when I was editing the config file directly via SWA. I only discovered this because I decided to try using the dab CLI instead

atyshka avatar Aug 29 '23 15:08 atyshka

Could this limitation be listed on the Data API Builder Known Issues page?

jknutson avatar Sep 01 '23 15:09 jknutson

Hi @jknutson , Yes We will add it to the known issues page. Can you also please share the use case here?

sajeetharan avatar Sep 01 '23 19:09 sajeetharan