File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 "changesets" : [
88 " effect-v4-beta" ,
99 " insertable-null-and-jointable-fk" ,
10+ " jointable-db-interface-physical-columns" ,
1011 " legacy-customtype-detector"
1112 ]
1213}
Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 6.0.0-next.3
4+
5+ ### Patch Changes
6+
7+ - ff58e31: Fix: implicit M: N join tables now expose their physical ` A ` /` B ` columns in the
8+ Kysely ` DB ` interface.
9+
10+ Kysely uses ` DB ` -interface field names as literal SQL column identifiers. The
11+ join-table entry was emitted as ` Schema.Schema.Type<typeof JoinTable> ` , whose
12+ keys are the ** decoded** semantic names (` product_id ` , ` product_tag_id ` ). But an
13+ implicit many-to-many table's physical Postgres columns are ` A ` /` B ` (Prisma's
14+ convention), so a query like
15+ ` db.selectFrom('_product_tags').where('_product_tags.product_id', ...) ` emitted
16+ ` WHERE product_id ` against a table that only has ` A ` /` B ` → runtime SQL error.
17+
18+ The join-table ` DB ` entry is now ` Schema.Codec.Encoded<typeof JoinTable> ` , whose
19+ keys are the ** encoded** physical columns ` A ` /` B ` (carrying the branded
20+ ` columnType ` values, so joins remain type-safe against the parent table's branded
21+ id). The semantic-name mapping still lives only in the schema's
22+ ` Schema.encodeKeys ` , used when decoding a raw DB row. Regular (non-join) model
23+ tables are unchanged (` Schema.Schema.Type<typeof Model> ` ).
24+
325## 6.0.0-next.2
426
527### Patch Changes
Original file line number Diff line number Diff line change 11{
22 "name" : " prisma-effect-kysely" ,
3- "version" : " 6.0.0-next.2 " ,
3+ "version" : " 6.0.0-next.3 " ,
44 "description" : " Prisma generator that creates Effect Schema types from Prisma schema compatible with Kysely" ,
55 "license" : " MIT" ,
66 "author" : " Samuel Ho" ,
You can’t perform that action at this time.
0 commit comments