Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I store nested Data? #124

Open
Hrishi25 opened this issue May 13, 2022 · 1 comment
Open

How can I store nested Data? #124

Hrishi25 opened this issue May 13, 2022 · 1 comment

Comments

@Hrishi25
Copy link

id: 1
company: xyz
employes:

I have above structure of incoming data. I have 2 struts to store company info and employee info. So basically I have belo field in strut company

type Company strut {
Id string
Employees []Employee
}

For above structure I wonder how do I insert employee information

@yinonavraham
Copy link

Inserting objects with nested data is exactly the same as any other objects.
The main question should probably be - how to create indexes for such structs, right?
If so, you can refer to issue #97 (on using nested fields for indexes) which answers this question, including a very good example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants