kysely-org / kysely

A type-safe typescript SQL query builder
https://kysely.dev
MIT License
10.22k stars 259 forks source link

Mapping field names between database and object #909

Closed philongvn99 closed 4 months ago

philongvn99 commented 5 months ago

Hello everyone, For some reason, the names of fields in the source code and my database are different. Is there anyway to map them as @map() in Prisma? I have tried kysely-mapper but face an error about 'Kysely cannot be assigned to Kysely', it come from a #private property of Kysely If you have experienced any of the above problems, please help me. Thanks

igalklebanov commented 5 months ago

Hey 👋

This needs more info. e.g. dependencies used, how you instantiate your Kysely instance, how fields are named in database versus runtime, etc.