7

I am just playing around with meteor and started using simple-schema and collection2. I moved from mongoose and node so my question could be a bit noob, so bear with me.

In mongoose I could just add a type called schema.ObjectId,in some field to emulate reference, but I don't see any such implication in collection2. Is there any quick solution for that?

Is using type: String a good idea for this scenario?

Thanks in advance

Suman Lama
  • 946
  • 1
  • 9
  • 26

1 Answers1

8

SimpleSchema.RegEx.Id is the type that should be used for mongo id fields for all typical cases.

Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
Adnan Y
  • 2,982
  • 1
  • 26
  • 29