extendModels

Versioning History

API Version v1.0.0 - Introduced extended configuration option.

This object's entries are a key-value pair. When the schema is being generated, all non-id and non-relation fields from the value model will be added to the key model. To extend models, add the following line to your exported configuration object:

prisma-util.config.mjs
export default {
    // Other configuration lines
    extended: {
        "filePath1:Model1": "filePath2:Model2"
    }
}

In this example, Model1 will take on all non-id and non-relation fields from Model2.

Last updated