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

    Daniel Netzer

    01/07/2020, 3:43 PM
    the query is executed on a DB with 1 million records approx. and is just selecting the top 50 and returning a single property. the id for each result.
    c
    n
    • 3
    • 4
  • d

    Daniel Netzer

    01/07/2020, 3:45 PM
    the schema is generated using the
    prisma introspect
    cmd
  • d

    Daniel Netzer

    01/07/2020, 3:45 PM
    the backend is based on NestJS
  • d

    Daniel Netzer

    01/07/2020, 4:04 PM
    is prisma dieing? https://www.npmtrends.com/sequelize-vs-typeorm-vs-prisma-vs-prisma2
    πŸ€¦β€β™‚οΈ 1
    πŸ‘€ 1
    πŸ’€ 1
    e
    r
    +3
    • 6
    • 11
  • m

    Matt Wilson

    01/07/2020, 7:17 PM
    I'm starting a new project; should I use prisma 1 or 2?
    e
    a
    +3
    • 6
    • 8
  • a

    Ahmad Hakroosh

    01/08/2020, 10:25 AM
    ?
  • a

    Ahmad Hakroosh

    01/08/2020, 10:25 AM
    I have a problem saving/editing data in Prisma Admin, could anyone assist
  • j

    Justin Warren

    01/08/2020, 1:53 PM
    What is the best way to nuke the initial migrations of User and Post? Would rather not have those in history.
  • s

    Steffen

    01/08/2020, 1:57 PM
    Hi, I want to build a hierarchy with elements of the same model type. But when I connect my resource1.parent with resource2.id, alway resource2.parent is getting updated (resource2.parent=resource1.id). Could anyone assist? BR
    • 1
    • 1
  • m

    Ming Yu

    01/08/2020, 4:51 PM
    where can i join the photon prisma2 channel?
    m
    b
    • 3
    • 2
  • e

    Enrico Hofmann

    01/08/2020, 7:03 PM
    Hi together, I have a question. I am new to prisma and want to know where I can find a demo where I can see the advanced combined where filter that is mention in some posts.
  • p

    pt789

    01/08/2020, 8:55 PM
    Can someone give me an answer on this question https://www.prisma.io/forum/t/optional-nullable-elements-in-query-result/7216 ? Is there a way to define root type in model as non nullable ?
  • j

    James Fox

    01/09/2020, 2:44 AM
    Hi all! Ive just gone through the
    prisma2  init
    wizard and successfully connected to an existing Postgresql DB (only has 1 model). This appeared to be successful, but when i run
    yarn prisma2 dev
    , it tells me a migration will alter all my columns and result in data loss. Did I do something wrong?
    • 1
    • 2
  • j

    James Fox

    01/09/2020, 2:45 AM
    Copy code
    Generators
       ──────────────────────────────────────────────
       Photon.js    Waiting for migrations...
    
       ⚠️   There will be data loss:
    
         β€’ You are about to alter the column `description` on the `item` table, which still contains 979 non-null values. The data in that column will be lost.
  • k

    Kevin Wolf

    01/09/2020, 4:39 AM
    Hi! Anyone know if there is a way of doing an object type field?, I have the following models:
    Copy code
    model User {
      id           String       @default(cuid()) @id
      email        String       @unique
      password     String
      firstname    String
      lastname     String
      organization Organization
    }
    
    model Organization {
      id      String @default(cuid()) @id
      name    String
      members User[]
    }
    but for
    Organization.members
    , I want to make an array of objects like this:
    { role: SOME_ROLE_ENUM, user: User }
    . Is there a way to do that without having to create another model like
    OrganizationMember
    ?
    j
    • 2
    • 8
  • h

    Habeeb Ahmed

    01/09/2020, 6:52 AM
    Hi @channel I'm trying deploy my backend to prisma server (created manually on heroku) But it's not showing in prisma CLI Would you mind helping Thank you
  • h

    Habeeb Ahmed

    01/09/2020, 6:54 AM
  • h

    Habeeb Ahmed

    01/09/2020, 6:54 AM
  • h

    Habeeb Ahmed

    01/09/2020, 6:55 AM
    Following are the attached screenshot Please let me know if I goofed up something
  • e

    Elyon

    01/09/2020, 10:48 AM
    I am using ra-data-opencrud to connect prisma to react-admin. Keep getting Error: Unknown resource Color. Make sure it has been declared on your server side schema.
    Copy code
    type Color {
        id: ID!
        title: String
        hex: String
        ral: String
        visible: Boolean
        suspended: Boolean
        excludeAt: [ID]
      }
    
      input ColorInput {
        id: ID
        title: String
        hex: String
        ral: String
        visible: Boolean
        suspended: Boolean
        excludeAt: [ID]
      }
    
      input ColorFilter {
        q: String
        id: ID
        title: String
      }
    
      type ListMetadata {
        count: Int!
      }
    
      type Query {
        Color(id: ID!): Color!
        allColors(
          page: Int
          perPage: Int
          sortField: String
          sortOrder: String
          filter: ColorFilter
        ): [Color]!
        _allColorsMeta(
          page: Int
          perPage: Int
          sortField: String
          sortOrder: String
          filter: ColorFilter
        ): ListMetadata
      }
    
      type Mutation {
        createColor(input: ColorInput!): Color!
        updateColor(input: ColorInput!): Color!
        deleteColor(id: ID!): Color!
      }
    what is de standard type layout to make this work, cant wrap my head arround this? @weakky
    l
    m
    • 3
    • 9
  • a

    arthur

    01/09/2020, 3:31 PM
    Hello everyone, I'm having an issue while importing/exporting data from a prisma-dev service to a prisma-heroku (server + db) I successfully imported the datamodel and the nodes + lists but when it comes to relations, a bunch of errors regarding missing foreign keys are thrown in the terminal (e.g. "Failure inserting into relationtable IntegrationAuth with ids StringIdGCValue(cjxucf9ksgkaf0b70omdt0lzx) and StringIdGCValue(cjxucf9kvgkag0b702uah4ssa). Cause: insert or update on table \"IntegrationAuth\" violates foreign key constraint \"IntegrationAuth_setup_fkey\"\nΒ Detail: Key (setup)=(cjux6rrgn0rk50b22erj4sym5) is not present in table \"IntegrationSetup\".",). There are about 100 of them and then, when I look at the databrowser, all the data is there but, logically, there is no relation. I tried several things I found on the internet and nothing seemed to work Could someone please help me, I don't really know where to look at to solve that problem? Thank you very much πŸ™‚
  • j

    James Fox

    01/09/2020, 4:25 PM
    Does Prisma provide a way to auto increment an I’d field in postgres? If not, can I manually configure that in the DB myself and have it work?
    d
    • 2
    • 3
  • e

    Enrico Hofmann

    01/09/2020, 4:28 PM
    Hi together, in some Prisma Examples I see sometimes something like StringFilter than create some additional filter fields
  • l

    Lukas Greb

    01/09/2020, 7:25 PM
    Can someone please guide me in the right direction on how to access my GQL (yoga) server internally? Every tutorial just says: Now that your server is set up, use Playground/GQLExplorer to test it... I would like to use something in the form of
    server.resolvers.Mutation.insertSomeData(someAttributeΒ =Β "Something");
    but I can't find anything useful...
  • k

    Kevin Wolf

    01/09/2020, 8:50 PM
    Hello! any recommendation to avoid having sooo many connections when working with postgres? 😞
  • k

    Kevin Wolf

    01/09/2020, 8:51 PM
    all those sessions where creating by just calling a simple `.findOne`query
  • a

    arthur

    01/10/2020, 8:36 AM
    Hello, does someone know why the prisma people are not responding anymore to questions on Intercom ?
    h
    • 2
    • 2
  • w

    Will

    01/11/2020, 8:34 AM
    Hi everyone, I'm thinking about implementing prisma to a project, the only thing is I'm thinking about itself this is going to be worth using it now or if I should use another ORM until prisma2 comes out. Any thought/suggestions about this?
    πŸ‘ 1
  • s

    Smakosh

    01/11/2020, 3:28 PM
  • s

    Smakosh

    01/11/2020, 3:32 PM
    new Date().getFullYear()
1...341342343...637Latest