Generator and Prisma schema, any known limitations?

I asked this on Discord, repeating here. I am trying to learn how far I can get with scaffolding. I used prisma introspect to generate schema for our existing database, but running generate for various models fails with errors “No schema definition found for xxx in schema.prisma file”. In the models i tried to generate, xxx is always defined as a relation xxx xxxt[] , and the models for xxx exist. Are there any obvious limitations to the data model or names in the relations / foreign keys in particular that I should be aware of?

Hi @aepshteyn one thing you might try is generating types first without relations — or run certain scaffolds in certain orders.

There may be dependency in a relation where the model isn’t there yet.

Often after I introspecting I do each model individually and then redo generate with relations. Basically I do them in an order where a related model has already successfully generated.

Hi David, thank you for your help. That is pretty much what I did, and everything worked. In fact I did create relations including many-to-many as per the docs.

While ultimately it would be great to just scaffold anything that Prisma can generate from any database, i’d say I was a bit too demanding :slight_smile: My next step is to see how to customize the scaffolding templates and create as much of an administrator dashboard app as possible with as little coding as possible :slight_smile: . Any advice on that?