P
Prisma4mo ago
jermahs

SOLVED: Create w/ sub create: Subquery returned more than 1 value

Per the documentation, I'm fairly certain I'm using this correctly. However, I'm getting the following error. We are on MSSQL and Prisma 5.11.0
"PrismaClientUnknownRequestError:
Invalid `prisma.testimonials.create()` invocation:

Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(TokenError { code: 512, state: 1, class: 16, message: "Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.", server: "EC2AMAZ-T1B4938", procedure: "updateFieldID", line: 13 }), transient: false })
"PrismaClientUnknownRequestError:
Invalid `prisma.testimonials.create()` invocation:

Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(TokenError { code: 512, state: 1, class: 16, message: "Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.", server: "EC2AMAZ-T1B4938", procedure: "updateFieldID", line: 13 }), transient: false })
Seeing as the error is coming from the MSSQL Server, is this a limation on MSSQL? If so, is there plans to fix and/or is there a workaround?
No description
1 Reply
jermahs
jermahs4mo ago
I figured this out, we had a trigger on a table that was causing a problem and returning data that Prisma didn't like.