Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLVED

Nested fields are we need to use mandatory for schemas

Avatar

Level 2

what is Nested fields,where we use ?

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Saiteja_1225  

can you specify what you mean?

in general, nesting is creating a hierarchical structure of fields e.g., by having a field of type object, that may contain attributes which can add even more nesting etc.

bjoern__koth_0-1751485752193.png

 

 

it really comes down to your needs and what kind of structure makes most sense to represent your data. 
I would aim for a fairly flat structure though.

Cheers from Switzerland!


View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @Saiteja_1225  

can you specify what you mean?

in general, nesting is creating a hierarchical structure of fields e.g., by having a field of type object, that may contain attributes which can add even more nesting etc.

bjoern__koth_0-1751485752193.png

 

 

it really comes down to your needs and what kind of structure makes most sense to represent your data. 
I would aim for a fairly flat structure though.

Cheers from Switzerland!


Avatar

Level 2

Hi @Saiteja_1225 

Can you please add more details to your question. Although whether or not nested fields in a schema should be mandatory depends on the specific requirements of your data model and how you intend to use the schema. While nested fields can be made required, it's not always necessary, and doing so can sometimes lead to unintended consequences if not handled carefully.

Understanding Nested Fields and Required Properties:

Nested fields:
These are fields within a schema that themselves have a schema definition, allowing for hierarchical data structures.

Required properties:

In a schema definition, required: true means that the field must be present and have a value when creating or updating a document.