Multiple schema references

I would love to ask a question.

Because we can reference multiple schemas in one property I wanted to know if there is a way to know what schema does the hash belong to. What Schema is being referenced.

I was thinking about implementing a key value pair with key as schema name and value as a reference to a schema.

Is there a way to do that with existing functionality?

Thank you so much for your help.

You mean from the API?

You have to query all referenes items and then you get the scheman name.

This is an example in C#:

You can use the API to query multiple content items by ids from multiple schemas

This is super helpful! Thank you so much!

Hi Sebastian, I looked at the code example you attached and still couldn’t really understand how I can implement it. I am using Squidex.ClientLibrary and in-order to create a client to get data I need a schema name.
Would love for your help.

Hi,

in this post I added a short sample: Get schema contents with set of ids doesn't work

The contents-client is usually per schema, but the method to get contents by id is independent from the schema. It is a inconsistency…

So you can just use any schema name or a dummy schema. As long as you only use GetAsync(HashSet) it does not matter…

Thank you so much Sebastian. I really appreciate your help

Maybe it will be nice to introduce new api in dotnet client with something as:

clientManager.CreateGenericContentsClient();

or

clientManager.CreateRawContentsClient();

which could return DynamicData / DynamicConent by default base on your example from another post.

Base on request on this forum (and my relatively short experience) it looks like it is pretty common to use case.

1 Like