question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

update() returning { count: 1 }

See original GitHub issue
const user = await context.prisma.user.update({
  where: {
    id: localGlobalID,
  },
  data: {
    title,
  },
});

console.log("updated user", user);

// Output
updated user { count: 1 }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nikolasburkcommented, Mar 3, 2021

Closing this one as well as it was the same underlying issue as https://github.com/prisma/prisma/issues/5884

1reaction
dan003400commented, Feb 27, 2021

Actually - I take that back, this is the same model that we saw the original issue with return type being { count: 1 }.

So it sounds like this model in our schema generators is messed up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ROWCOUNT returning 1 when no UPDATE made
I have some SQL within a stored procedure where I am updating a table based on another SELECT statement from a temp table...
Read more >
Working with SQL Server ROWCOUNT - SQLShack
SET ROWCOUNT is a system object that enforces the SQL Server Engine to stop processing the query after the specified number of rows...
Read more >
5.4.1 mysql_affected_rows() - MySQL :: Developer Zone
It returns the number of rows changed, deleted, or inserted by the last statement if it was an UPDATE , DELETE , or...
Read more >
JDBC executeUpdate can return a negative row count ... - IBM
For an SQL statement that can have an update count, such as an INSERT, UPDATE, or DELETE statement, the returned value is the...
Read more >
MySQL COUNT - Counting Rows in a Table
The return type of the COUNT() function is BIGINT . The COUNT() function returns 0 if there is no matching row found. MySQL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found