You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HI. I’m currently working on a project using MedusaJS and have a question regarding the use of metadata for entities. The documentation provides some examples of using metadata for storing external keys and other basic scenarios. However, I would like to understand the extent of its capabilities and best practices for more complex use cases.
Specifically, I am considering the following:
1. Parent-Child Relationships: Can I use metadata to store a subProductId in a product entity to establish parent-child relationships? If so, what are the potential limitations or performance considerations? (Instead of extending the product entity adding this relationship)
2. Complex JSON Objects: Is it advisable to store more complex JSON objects within the metadata field for entities? For example, using metadata to hold structured data that extends the entity’s functionality significantly.
Could you provide some guidance on when it is appropriate to use metadata for extending functionality versus when it is better to extend the entity itself? Are there any performance implications, best practices, or potential pitfalls I should be aware of?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
HI. I’m currently working on a project using MedusaJS and have a question regarding the use of metadata for entities. The documentation provides some examples of using metadata for storing external keys and other basic scenarios. However, I would like to understand the extent of its capabilities and best practices for more complex use cases.
Specifically, I am considering the following:
Could you provide some guidance on when it is appropriate to use metadata for extending functionality versus when it is better to extend the entity itself? Are there any performance implications, best practices, or potential pitfalls I should be aware of?
Thank you for your assistance!
Beta Was this translation helpful? Give feedback.
All reactions