Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecordDoesNotExist Comeback! #914

Closed
yovanoc opened this issue Nov 10, 2019 · 7 comments
Closed

RecordDoesNotExist Comeback! #914

yovanoc opened this issue Nov 10, 2019 · 7 comments
Assignees
Labels
kind/regression A reported bug in functionality that used to work before.
Milestone

Comments

@yovanoc
Copy link

yovanoc commented Nov 10, 2019

Hello today I see that in the prisma2@2.0.0-alpha.293, binary version: 54c4d8ce690254b5d0c77a21361896a6ca3fc4b7 we have a comeback from the findOne method of the old
image
instead of returning null :/

@pantharshit00
Copy link
Contributor

pantharshit00 commented Nov 11, 2019

I can confirm this regression.

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

@pantharshit00 pantharshit00 added the kind/regression A reported bug in functionality that used to work before. label Nov 11, 2019
@janpio janpio added this to the Preview 17 milestone Nov 11, 2019
@janpio janpio assigned janpio and timsuchanek and unassigned janpio Nov 11, 2019
@janpio
Copy link
Member

janpio commented Nov 11, 2019

Reproduction in prisma/prisma-client-js#245 (comment)

@timsuchanek
Copy link
Contributor

@dpetrick
Copy link
Contributor

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

@tvvignesh
Copy link
Contributor

tvvignesh commented Dec 16, 2019

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: "test@xyz.com",
              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: "test@xyz.com"
            },
            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: prisma2@2.0.0-preview018.2, binary version: 3c4da1d6caa0c40a0210a346ec982c77f74e18c7

@janpio

This comment has been minimized.

@tvvignesh

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/regression A reported bug in functionality that used to work before.
Projects
None yet
Development

No branches or pull requests

6 participants