Skip to content

update by secondary index does not update the primary value #44

@dvv

Description

@dvv
await db.offices.update({
  where: { name: "o1" },
  data: {
    address: "o1a",
  },
})
console.log(
  await db.offices.findMany({ where: { name: "o1" } })
)
// GOOD: [{ id: "XXX", address: "o1a", ... }]
console.log(
  await db.offices.findMany({ where: {} })
)
// BAD: [{ id: "XXX", ... }]

Is that intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions