Skip to content

ZenStack Release v1.0.0-alpha.79

Compare
Choose a tag to compare
@ymc9 ymc9 released this 19 Mar 15:45
· 876 commits to main since this release
dd3ae27

What's Changed

Potential Breaking Changes

  • Prisma relation-related mutations: connect, connectOrCreate, and update now trigger the validation of "update" policy on the relation owner side (since such operations update foreign keys). It wasn't enforced in the previous releases. You may need to adjust access policies accordingly.

E.g.:

model User {
  ...
  posts Post[]
}

model Post {
  ...
  author User? @relation(fields: [authorId], references: [id])
  authorId String?
db.user.create({
  data: {
    posts: { connect: { id: 'post1' } }
  }
});

The above code may fail if Post model is not updatable by the current user.