How to include common schemas...

12 views
Skip to first unread message

Pramod Sangawar

unread,
Oct 18, 2015, 5:56:38 PM10/18/15
to mongoose-users
Suppose I have a Mongoose Schema or a Model called Address that can be used by
other Schemas and/or Models...
Like Address.cs
Something1.cs
Something2.cs

and Something1 and 2 wants to include Address as one of the attributes.
I am doing something like this as part of a MEAN Stack.
Only Something1 and Something2 are collections and not Address...

Currently, I am maintaining them as part of both Some...1 and 2..

Note: I read about subdocuments etc... like Parent and Child etc. But what if a Child want to be part of many 
Parents...is my issue.

Thanks in advance.
 
Pramod
Reply all
Reply to author
Forward
0 new messages