Skip to content

RecordDoesNotExist Comeback! #914

Closed
Closed

Description

@yovanoc

Hello today I see that in the [email protected], binary version: 54c4d8ce690254b5d0c77a21361896a6ca3fc4b7 we have a comeback from the findOne method of the old
image
instead of returning null :/

Activity

  1. pantharshit00 commented on Nov 11, 2019

    @pantharshit00
    Contributor

    I can confirm this regression.

    (Original feature issue: prisma/prisma-client-js#245)

  2. added this to the Preview 17 milestone on Nov 11, 2019
  3. janpio commented on Nov 11, 2019

    @janpio
    Contributor
  4. dpetrick commented on Nov 20, 2019

    @dpetrick
    Contributor

    Fixed in the query-engine as well now, we can remove the Photon workarounds with preview 17.

  5. tvvignesh commented on Dec 16, 2019

    @tvvignesh
    Contributor

    I am not sure why, but I am getting this error. To test, I ran 2 queries against database with no records.

    This works (with findMany):

    photon.userAuthentications.findMany({
                where: {
                  email: "[email protected]",
                  mobile: "123456789"
                },
                select: {
                    id: true,
                    local: true,
                    username: true,
                    email: true,
                    mobile: true,
                    status: true,
                    password: true
                }
            });
    

    This does not (with findOne) - It just says error in Photon:

    photon.userAuthentications.findOne({
                where: {
                  email: "[email protected]"
                },
                select: {
                    id: true,
                    local: true,
                    username: true,
                    email: true,
                    mobile: true,
                    status: true,
                    password: true
                }
            });
    

    When I open the details of the error, it says:

    Cannot convert undefined or null to object
    

    My Schema:

    model UserAuthentication {
        id                String   @default(cuid()) @id
        email             String   @unique
        mobile            String?  @unique
        local             String
        username          String   @unique
        password          String?
        facebook          String?
        google            String?
        github            String?
        microsoft         String?
        amazon            String?
        status            String
        connectedAccounts String[]
        metadata          String?
        tagIDList         String[]
        createdDate       DateTime @default(now())
        updatedDate       DateTime @updatedAt
    }
    

    Prisma2 version: [email protected], binary version: 3c4da1d6caa0c40a0210a346ec982c77f74e18c7

  6. janpio commented on Dec 17, 2019

    @janpio
  7. tvvignesh commented on Dec 18, 2019

    @tvvignesh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions