Hopefully an easy one - but I just spun up a new i...
# orm-help
k
Hopefully an easy one - but I just spun up a new instance of prisma with mongo via
docker-compose
copied directly from the docs. I wasn't able to do a
prisma deploy
without first adding
@id
to the id field of the
User
type created by the init. Is this expected? Is mongo a good choice for a db backend if it doesn't really matter from a business perspective or would postgres be better?
d
The Mongo connector uses already an updated version of our data model. If you check the our Mongo specific documentation the differences should be explained there. The general documentation will still use the current data model specification until all connectors make the switch. Using @id vs @unique is one example of the differences between the two
And we are working on recommendations of when to use document vs SQL connectors. As a rule of thumb I would say if you are read heavy and can make extensive use of embedded types for your datamodel try Mongo. If you use a lot of relations that can not be modeled as embedded and do a lot of filtering and traversing there use SQL
👍 1
k
Thanks @do4gr ! That helped move things along there. Appreciate the insight.