relations

Experimental Feature

This configuration entry is related to an Experimental (Optional) feature called Cross-File Relations. Before you start to configure this section, make sure to read the page specific for this feature (accessible here) and this page that explains how to enable Experimental Features.

Versioning History

API Version v1.0.0 - Introduced relations configuration option.

This object's entries are a key-value pair. When the schema is being generated, the remapper will identify the relations by using this configuration section to ensure that the you don't get reverse mapping errors in Prisma. This is a feature that is a bit harder to configure correctly, and as such we recommend that you familiarize yourself with the topics covered on this page. To tell Prisma Util how to handle your relations properly, add the following line to your exported configuration object:

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

In this example, column1 will have it's type changed to Model2.

Last updated