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

join two schemas #452

Closed
tejash-jl opened this issue Mar 21, 2023 · 2 comments · Fixed by Sunbird-RC/sunbird-rc-core#277
Closed

join two schemas #452

tejash-jl opened this issue Mar 21, 2023 · 2 comments · Fixed by Sunbird-RC/sunbird-rc-core#277
Assignees

Comments

@tejash-jl
Copy link
Member

join two schemas while adding an entity
an entity can refer to another entity being already created

for eg
Teacher
{
"name": "Deepak Rana"
}
assume the osid of this teacher to be 123-123

student can refer to this entity in the following way
Student
{
"name": "Chaitanya Pandit"
"references": "did:Teacher:123-123"
}

when we search for student, the referred entity i.e Teacher will also be returned in response

@Sreejit-K
Copy link

Sreejit-K commented Jan 23, 2024

@srprasanna @holashchand Here are my observations -

  • If the reference doesn't exist in the system it stores and returns it as a string.
  • On updating the entity with an existing reference entity it updates and returns the reference entity
  • One Issue I found out is the visibility scope - the private fields of the reference entity are getting exposed, this should be handled.
  • And also need a round of discussion on
  • should it return specific fields of the referred entity? - we can add refernceFeilds to return in the osConfig and make corresponding changes
  • or return the whole entity with out the private fields - have to add the filter layer on the reference nodes using the reference entity Type

can you please add your comments on these. Thanks!

@Sreejit-K Sreejit-K moved this from In Progress to In review in Sunbird RC Roadmap 2023-24 Jan 29, 2024
@Sreejit-K
Copy link

Unable to update the exiting PR linked to this ticket so attaching the new PR here - Sunbird-RC/sunbird-rc-core#277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

4 participants