title: Can I map two columns in a one-to-many relationship in Prisma?
body: <p>I'm trying to create a prisma schema, where I have an Order model, and a Client model. I would like to have a one-to-many relation between clients and orders.</p>
  <p>I have it working with this Order model:</p>
  <pre><code>clientId     Client            @relation(fields: [clientId], references: [id])
  clientId     Int
  </code></pre>
  <p>But wanted to also include the client name. Something like this doesn't work:</p>
  <pre><code>client       Client            @relation(fields: [clientName, clientId], references: [name, id])
  clientName   String
  clientId     Int
  </code></pre>
  <p>This gives me the error</p>
  <pre><code>Error validating: The argument `references` must refer to a unique criteria in the related model `Client`. But it is referencing the following fields that are not a unique criteria: name, id
  </code></pre>
  <p>Is this something that is possible within the Prisma schema? I can do it with my controller in NestJS, but ideally I would want to be done in the Prisma layer.</p>