This repository was archived by the owner on Mar 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
orm/src/client/crud/dialects Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -448,9 +448,16 @@ export abstract class BaseCrudDialect<Schema extends SchemaDef> {
448448 }
449449
450450 private buildArrayFilter ( fieldRef : Expression < any > , fieldDef : FieldDef , payload : any ) {
451- const clauses : Expression < SqlBool > [ ] = [ ] ;
452451 const fieldType = fieldDef . type as BuiltinType ;
453452
453+ // Allow direct array payloads to mean equality on the list
454+ if ( Array . isArray ( payload ) ) {
455+ const value = this . transformPrimitive ( payload , fieldType , ! ! fieldDef . array ) ;
456+ return this . buildLiteralFilter ( fieldRef , fieldType , this . eb . val ( value ) ) ;
457+ }
458+
459+ const clauses : Expression < SqlBool > [ ] = [ ] ;
460+
454461 for ( const [ key , _value ] of Object . entries ( payload ) ) {
455462 if ( _value === undefined ) {
456463 continue ;
Original file line number Diff line number Diff line change @@ -221,14 +221,17 @@ export class RPCApiHandler<Schema extends SchemaDef = SchemaDef> implements ApiH
221221 }
222222
223223 private async processRequestPayload ( args : any ) {
224- const { meta, ...rest } = args ;
224+ const { meta, ...rest } = args ?? { } ;
225225 if ( meta ?. serialization ) {
226226 try {
227227 // superjson deserialization
228228 args = SuperJSON . deserialize ( { json : rest , meta : meta . serialization } ) ;
229229 } catch ( err ) {
230230 return { result : undefined , error : `failed to deserialize request payload: ${ ( err as Error ) . message } ` } ;
231231 }
232+ } else {
233+ // drop meta when no serialization info is present
234+ args = rest ;
232235 }
233236 return { result : args , error : undefined } ;
234237 }
You can’t perform that action at this time.
0 commit comments