Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

prisma multiple queries in one query

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 :: without the filter() method 
Javascript :: Listen to custom event in Vue js 
Javascript :: javascript foreach next iteration 
Javascript :: cannot read property of undefined js laravel mix 
Javascript :: js calculate hours between two times 
Javascript :: How to set canvas height and width dynamically 
Javascript :: pusher js 
Javascript :: sort array based on subarray value 
Javascript :: load image file input jquery 
Javascript :: auto scrolling to end scrollview react native 
Javascript :: javascript create li element and append to ul 
Javascript :: node js swear filter 
Javascript :: verifier si chaien ade caractere apparait dans autre js 
Javascript :: how to return true or false based on condition by looping arrayin react 
Javascript :: fib numbers javascript 
Javascript :: Obtener url base 
Javascript :: router.put method 
Javascript :: sentry configure scope 
Javascript :: findOneAndUpdate many fields 
Javascript :: mongodb-nodejs-driver-deprecationwarning-collection-count-is-deprecated 
Javascript :: prompt dentro de una funcion javascript 
Javascript :: angularjs smooth scroll css 
Javascript :: autonumeric stimulus 
Javascript :: How to lock thread in javascript energy efficient 
Javascript :: angularjs Indicators and Paginator styling for PrimeNG Carousel 
Javascript :: js read html file 
Javascript :: Se Chartjs horizontal 
Javascript :: Check if a user joins, leaves, or moves channels discord.js 
Javascript :: new Date() how can i ue 
Javascript :: nodejs api find data with id 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =