Skip to content

Unselected Fields Returning as null When Using select in Prisma Dart #436

@Hackman-Adu

Description

@Hackman-Adu

What version of Prisma Dart is running?

5.2.0

What version of Prisma CLI is running?

5.20.0

What type of app are you using?

Dart Native (Server/CLI)

What database are you using?

MySQL

What steps can reproduce the bug?

var user = await prisma.user.findUnique(
  select: UserSelect(
    firstName: true, lastName: true, password: true, userId: true),
  where: UserWhereUniqueInput(emailAddress: 'user@example.com')
);

What is the expected behavior?

Only the selected fields (firstName, lastName, password, userId) should be returned.

What do you see instead?

Other unselected fields are also returned with null values.

Additional information

I encountered an issue where unselected fields are being returned as null in the response when using the select option with Prisma Dart. I expected Prisma to only return the fields I selected, but instead, it returns other fields as null.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions