Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

prisma nested create

const user = await prisma.user.create({
  data: {
    email: 'ariadne@prisma.io',
    name: 'Ariadne',
    posts: {
      create: [
        {
          title: 'My first day at Prisma',
          categories: {
            create: {
              name: 'Office',
            },
          },
        },
        {
          title: 'How to connect to a SQLite database',
          categories: {
            create: [{ name: 'Databases' }, { name: 'Tutorials' }],
          },
        },
      ],
    },
  },
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: react native scan network 
Javascript :: Listen to custom event in Vue.js 
Javascript :: vertical lineal star pattern javascript 
Javascript :: fabric.js drawings 
Javascript :: vscode react must be in scope when using JSX - eslint 
Javascript :: getters javascript 
Javascript :: javascript get minutes between two dates 
Javascript :: Sorting Array of String, Numbers or Objects in javascript 
Javascript :: regexp look for letter followed by 3 digits 
Javascript :: javascript enum includes value 
Javascript :: multiple populate on same level 
Javascript :: js button that starts programe 
Javascript :: v-if disable vue 
Javascript :: javascript interview questions geeksforgeeks 
Javascript :: js to jsx 
Javascript :: añadir input file a formdata javascript 
Javascript :: how to fetch devto api 
Javascript :: how to add defer attribute using js 
Javascript :: using multiple dropzones with formik field array 
Javascript :: node-js-eacces-error-when-listening-on-most-ports 
Javascript :: desync resolver 
Javascript :: command for importing fetchgraphqlquery in nextjs 
Javascript :: react-social-login-buttons 
Javascript :: React Router rendering blank pages for all components 
Javascript :: angularjs GetVideos API, Cant get the key parameter inside the array 
Javascript :: DeepCopy in Angularjs 
Javascript :: How can change the display of the product images on the PDP? Spartacus 
Javascript :: how to edit data retrieval using jsp 
Javascript :: debugJSON 
Javascript :: disconnect google colab runtime 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =