Hi guys, Is it possible to have multiple schemas ...
# orm-help
s
Hi guys, Is it possible to have multiple schemas for a collection via prisma? Like something done via mongoose below: var schemaOne = new Schema({ "stype": { type: String, default: "one" }, "myid": String, "f1": String }); var schemaTwo = new Schema({ "stype": { type: String, default: "two" }, "myid": String, "f2": String }); var One = mongoose.schema('one', schemaOne, 'coll'); var Two = mongoose.schema('two', schemaTwo, 'coll');
1
a
Hey there, Are you referencing having different schemas for the same collection? I don’t think that would be possible in the Prisma Schema. You would need to have two separate collections or potentially use two different composite types.
s
Hey Austin, Thought there is way as mongoose. Anyway, thanks for your reply 🙂
a
What is the use case for specifying different schemas for the same collection?
s
Writing multiple steps form for business loan application. As it is a long process which salesperson is allowed to complete certain pages and get back to complete the remaining pages any time when they are free.