What's Changed
Fixes
- Fixed a TypeScript "Type instantiation is excessively deep and possibly infinite" (TS2589) error when passing a generated
XxxUpdateArgs/XxxUpsertArgstype directly intoupdate/upserton a schema with many-to-many relations #2778 - Fixed relation queries with
orderBy,skip,take,cursor, ordistinctfailing withcolumn "$$tN"."id" does not existwhen the relation's id/foreign-key or ordering field is omitted and the relation has a nested include #2830
Performance
- Access policy SQL on PostgreSQL is now index-friendly #2851:
field == auth().idon a@db.Uuidcolumn no longer casts the column totext. The same applies to text-like native types (@db.Text,@db.VarChar,@db.Char,@db.Citext)- Collection predicates (
?[...],![...],^[...]) compile toEXISTS/NOT EXISTSinstead of a correlatedcount(1) > 0aggregate relation == auth()(andrelation == relation) now compares the foreign-key column directly when the relation owns it, instead of running a correlated subquery into the related table
Full Changelog: v3.9.6...v3.9.7