Comments (4)
@tristancaron : Can you share a minimal reproduction for this? Like how does your datamodel look like?
from prisma-client-js.
I can't reproduce this with the following datamodel and code:
datasource db {
provider = "mysql"
url = "mysql://root:Harshit00@localhost:3306/issue_60"
}
generator photon {
provider = "photonjs"
}
enum Priviliages {
ADMIN
USER
}
model User {
id String @id @default(cuid())
username String @unique
password String
age Int @default(18)
priviliages Priviliages
}
// @ts-check
const Photon = require('@generated/photon')
const photon = new Photon.default()
async function main() {
await photon.connect()
const res = await photon.users.findMany({
select: {
priviliages: true,
},
})
console.log(JSON.stringify(res))
}
main()
.then(async () => {
await photon.disconnect()
})
.catch(async () => {
await photon.disconnect()
})
from prisma-client-js.
Here a project that is not working for me.
I added the file schema.sql
that we do use for the moment.
Once it's all set up, I run:
prisma2 introspect --mysql-db orion --mysql-host 127.0.0.1 --mysql-port 3306 --mysql-user root --mysql-password admin
I move the file generated into prisma/project.prisma
and add the lines:
generator photon {
provider = "photonjs"
}
Then I run
prisma2 generate
And finally
node index.js
We don't use Lift
for the moment, it is not "stable" enough for our Alpha product. But I guess it's another topic. (In case you wonder, we have naming issues for the relations tables, and migration doesn't work well, so the first time we run prisma2 dev
it's okay, but the second time, even we don't do any changes, it fails)
I hope it will help!
from prisma-client-js.
Ok, got it. We just merged a fix for this.
from prisma-client-js.
Related Issues (20)
- PANIC: index out of bounds: the len is 1 but the index is 1
- TypeError: Cannot read property '_clientVersion' of undefined at $connect 2.9.0 HOT 4
- Query engine binary for current platform "rhel-openssl-1.0.x" could not be found HOT 1
- PANIC: 1 auto issue create
- /node_modules/@prisma/client/runtime/index.js Module not found: Can't resolve 'async_hooks' HOT 2
- PANIC: called `Option::unwrap()` on a `None` value HOT 2
- PANIC: expected 0 parameters but got 1 (when running $executeRaw`...`) HOT 2
- PANIC: Started http server on http+unix:///tmp/prisma-4853a1cebce032c1dde71620.sock HOT 2
- findUnique (findOne) with a joined unique clause doesn't work HOT 1
- Unknown column name for "The provided value for the column is too long for the column's type HOT 1
- PANIC: 1 Invalid findMany() after nested write HOT 4
- PANIC: index out of bounds: the len is 1 but the index is 1 HOT 1
- PANIC: called `Result::unwrap()` on an `Err` value: Could not parse stored DateTime string: 2020-12-09 05:49:44 (input contains invalid characters) HOT 1
- PANIC: 1 HOT 1
- Generated types (index.d.ts) contains invalid expressions HOT 4
- Hi team, i have issue with update @prisma/client 2.7 to 2.13
- Starting a postgresql pool with 17 connections. HOT 3
- Error: PrismaClient is unable to be run in the browser. HOT 6
- Testing transfer...
- Support afterCreate/afterUpdate database triggers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisma-client-js.