-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unique array error #417
Labels
bug
Something isn't working
Comments
Facing the same issue, this is the only thing preventing me from using this. The model: model Song {
id Int @id @default(autoincrement())
scores Score[]
shouts Shout[]
title String
artist String
tags String[] @default([])
mbid String?
musicbrainzTitle String?
musicbrainzArtist String?
musicbrainzLength Int?
mistagLock Boolean @default(false)
coverUrl String?
smallCoverUrl String?
@@unique([title, artist, tags])
} The error:
Generated client: Self::TitleArtistTagsEquals(title, artist, tags) => (
"title_artist_tags",
::prisma_client_rust::SerializedWhereValue::Object(vec![
(
title::NAME.to_string(),
::prisma_client_rust::PrismaValue::String(title),
),
(
artist::NAME.to_string(),
::prisma_client_rust::PrismaValue::String(artist),
),
(
tags::NAME.to_string(),
::prisma_client_rust::PrismaValue::String(tags),
),
]),
), |
Fixed in 33e5ae1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I come from Javascript background so apologize in advance if I don't use the correct term/syntax. I am making a tree data structure using materialized path. Each path in a database should be a unique array. However, when I generate the client it created an invalid client.
Here is an example model:
Here is the offending snippet in the generated client:
The problem is that
value
onPathEquals
isi64
and the expected type forBigIntListFilter::Equals
isVec<i64>
.EDIT : Forgot to mention, my current workaround is manually editing the enum. I haven't tested it but it compiles just fine.
Before:
After:
The text was updated successfully, but these errors were encountered: