https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# orm-help
  • d

    Danny SMc

    12/08/2021, 11:52 AM
    Not familar with Slack, where do I go to get support?
  • m

    Moneeb

    12/08/2021, 2:52 PM
    Hello everyone! .. is there any example of Prisma prisma rainbow GraphQL API with email confirmation flow? @Taylor Barnett @nikolasburk @Mahmoud 🙏
  • g

    gustav

    12/08/2021, 3:47 PM
    I found out today that the order of arguments in a combined unique index when using
    findUnique
    matters, is this to be expected?
  • d

    Devin

    12/08/2021, 7:15 PM
    Is it possible to use nested _sum? I can’t seem to figure out a way. Perhaps resolved with _count? https://github.com/prisma/prisma/issues/5079
  • k

    Kavan

    12/09/2021, 8:56 AM
    Hi everyone, how I can use the value of a relationship to pass into where condition in another relationship (b_id: b.id)
    Copy code
    {
      select: {
        id: true,
        a: {
          where: {
            b_id: b.id
          },
          select: {
            id: true,
            name: true
          }
        },
        b: {
          select: {
            id: true,
            name: true
          }
        }
      }
    }
  • m

    Mischa

    12/09/2021, 12:12 PM
    Context: Timed out trying to acquire a postgres advisory lock (SELECT pg_advisory_lock(72707369)). Elapsed: 10000ms. See <https://pris.ly/d/migrate-advisory-locking> for details.
    Any idea why I get this when I run my migrations in a Lambda? I’m running against Aurora Serverless Postgres. It prevents me from doing migrations or rollbacks. I go in and manually terminate the backend but it just re-appears when I run migrations next.
  • l

    Leonard Filip

    12/09/2021, 12:58 PM
    Hi everyone! I have a scenario where I need to generate an entity’s id default value on the MySQL db level, instead of doing it on the Prisma level with
    uuid()
    . Having this entity:
    Copy code
    model Tag {
    	id String @id @default(dbgenerated("(uuid())")) @db.Char(36)
    	name String 
    	description String? @db.Text
    	slug String
    	isTopic Boolean @default(false)
    	articles Article[] 
    }
    When trying to insert a row via Prisma Studio (or via a
    prisma.tag.create
    inside
    seed.ts
    ), I get this error:
    Copy code
    Message: 
    Invalid `prisma.tag.create()` invocation:
    
    
      Could not figure out an ID in create
    
    Query: 
    prisma.tag.create(
    {
      data: {
        name: "science",
        description: "science description",
        slug: "science",
        isTopic: false,
        articles: {
    
        },
      },
      select: {
        id: true,
        name: true,
        description: true,
        slug: true,
        isTopic: true,
        articles: true,
      },
    }
    I guess Prisma doesn’t see any id and since it is a mandatory field, it throws this. Shouldn’t the
    dbgenerated
    attribute tell Prisma “hey, no need to provide the id upon create, the db will generate it!“?
    a
    • 2
    • 8
  • a

    Akshay Kadam (A2K)

    12/09/2021, 12:59 PM
    is there a way to set a new field named
    selectedId
    equal to the
    id
    that was recently created by prisma when using
    .create()
    ? i need this bcz i want to keep track of selected id on the server-side?
  • m

    Matt Matheson

    12/09/2021, 6:16 PM
    Hi, I have a use case where I'm struggling to craft a prisma query to count a fact table with multiple dimensions. Here's a contrived example of the schema and queries. Is something like this possible with prisma?
    • 1
    • 1
  • d

    Devi Prasad

    12/09/2021, 7:08 PM
    Any particular reason why scalar list filters is only supported for postgres?
    m
    • 2
    • 1
  • p

    Pedro J Poveda

    12/09/2021, 7:47 PM
    Can I set a limit on an array field? Like the max amount of records allowed
  • j

    J

    12/10/2021, 11:12 AM
    Is there a way to see the connection status of a prisma client instance?
  • n

    Nichita Z

    12/10/2021, 1:10 PM
    Hello! There seems to be a bug when using _count in a nested query. In this example, the query looks something like this: prisma.users.findMany() ->{ include(stories) } -> { include(mediaContent) } -> { include(likes) && include(views) &&_count (likes, views) }. But as you can see in the second screenshot, likes has 2 elements in it, but the count is 0. Is this tracked anywhere?
  • i

    Italo Gama

    12/10/2021, 1:20 PM
    Hello, i’m trying to deploy my nestJs application and i get this error, what i’m doing wrong?
    n
    • 2
    • 3
  • s

    Shmuel

    12/10/2021, 2:14 PM
    Hello. Does
    prisma migrate deploy
    run
    prisma generate
    as well?
    h
    • 2
    • 2
  • v

    Vladislav

    12/10/2021, 6:15 PM
    Hello everyone. How to change toExpNeg in a Decimal type field by default. For me, when the value is 0.00000002, 2e-8 is returned
  • j

    Jon Crowell

    12/10/2021, 10:12 PM
    I've got a connection string in my .env file. Whenever I save the file, a "\" is getting added in front of an * that is part of the connection string, which makes the connection string invalid. Anybody know what might be causing this behavior? Should be:
    hostNameInCertificate=*.database
    but when I save it becomes
    hostNameInCertificate=\*.database
    r
    • 2
    • 2
  • b

    Blakelock Brown

    12/11/2021, 2:29 AM
    Can I get some help? Our website jpg,store is currently experiencing a ton of traffic and every serverless function is failing. We're using vercel + prisma + managed DO postgresql DB and hitting connection pool timeout errors with pgBouncer=true
  • b

    Blakelock Brown

    12/11/2021, 2:52 AM
    Super strange... appears to be working again now, although our traffic is similar. Maybe something auto-scaled?
  • r

    Rowland

    12/11/2021, 3:19 AM
    Has anyone figured out how to run migrations with Prisma programmatically? I have some sql functions and triggers I want to run through with Prisma aside the regular migration files it generates. Previously, I'm able to that with TypeORM’s
    .runMigrations
    and
    connection.query(<stingified sql file content>)
  • m

    Michael Reh

    12/11/2021, 11:07 AM
    HI, I am evaluation prisma for a project. So I hope this question makes sense. When I have a model , is there a 'generic way' or best pratice how to extent a record by some custom fields at runtime. In our case one customer needs to add a field of type string to the user model and while another needs to add a field of type json. While querung those custom fields should always be return based on the same key / id. Is the middleware function the best approach ? So data can also be store in an extension table kind of concept. We call this customization. The customer can add new fields at runtime in a declarative way to the screen ( Frontend uses Angular ) which finally need to be persisted etc as well.
  • u

    user

    12/11/2021, 3:35 PM
    GraphQL Berlin Meetup #24 - Roy Derks - Why GraphQL Is Perfect For Microservices

    https://www.youtube.com/watch?v=DKvhI_pMpO8▾

    ◭ GraphQL and microservices architectures are perfectly compatible. You can use GraphQL as a data layer for these microservices and combine data from all these services into one universal API. This way, you can break the core of your services into different microservices while still providing one endpoint that your clients can interact with. Before diving into GraphQL, let's explore what microservices are and why it can be helpful to add GraphQL. ◭ Roy Derks, Developer Relations at StepZen, is an entrepreneur, speaker, and author from The Netherlands and, in his own words, 'wants to make the world a better place through tech'. He has been giving talks and training to developers worldwide on technologies like GraphQL, React, and TypeScript. Most recently he wrote the book Fullstack GraphQL. ◭ Get in touch with Roy: https://twitter.com/gethackteam ◭ Join our GraphQL Berlin Meetup group: https://www.meetup.com/graphql-berlin
  • s

    Sebastian Crossa

    12/11/2021, 5:39 PM
    Does anyone know when all of the other parts of this tutorial will be released? https://www.prisma.io/blog/fullstack-nextjs-graphql-prisma-oklidw1rhw
  • s

    Sebastian Crossa

    12/11/2021, 5:40 PM
    It’s been a while since part 2 came out (sept)
  • c

    Cymak

    12/11/2021, 5:54 PM
    Hi all, has anyone created a rule to be able to find any log4j libraries in their images?
  • c

    Cymak

    12/11/2021, 5:55 PM
    trying to find if we're vulnerable to CVE-2021-44228
    👍 1
    n
    a
    n
    • 4
    • 8
  • e

    Elie Steinbock

    12/11/2021, 9:29 PM
    is there anyway to store large numbers in prisma without using bigint? 2233459262 is a regular number in js, but doesn’t fit into int4. annoying to have to use BigInt in JS to handle this. we just want it to be a number
  • s

    Simoh 2k

    12/12/2021, 2:31 AM
    Hello everyone, I would like to recover some data with today's date please but it is not possible I have this:
    Copy code
    const today = new Date();
        const date =
          today.getFullYear() +
          '-' +
          (today.getMonth() + 1) +
          '-' +
          today.getDate();
    
        console.log('DATEEE', date);
        const data = await this.prisma.ticket.findMany({
          where: {
            createdAt: date,
          },
        });
        console.log(data);
    m
    • 2
    • 2
  • s

    Simoh 2k

    12/12/2021, 2:33 AM
    -> Argument createdAt: Got invalid value '2021-12-12' on prisma.findManyTicket. Provided String, expected DateTimeFilter or DateTime: because they have a timezone in the date (created_At) but I don't know if I can just have the date without a timezone
  • c

    Cymak

    12/12/2021, 3:51 AM
    It looks like CVE-2021-44228 shows up in CVE viewer now, although from my own searching on package info, I have found several vulns but nothing shows up in vulnerability explorer
1...518519520...637Latest