Skip to content

varchar[] doesn't work #434

@etodanik

Description

@etodanik

Steps to reproduce

  1. Set up a model with a varchar[] field:
 @property({ type: 'array', itemType: 'string', postgresql: { columnName: "roles", dataType: "varchar[]", nullable: "YES" } }) roles?: string[]; 
  1. Try to save something.

Current Behavior

Unhandled error in POST /users: 500 error: malformed array literal: "["customer"]" at Connection.parseE (/Users/danny/src/ecommin-api/node_modules/pg/lib/connection.js:581:48) at Connection.parseMessage (/Users/danny/src/ecommin-api/node_modules/pg/lib/connection.js:380:19) at Socket.<anonymous> (/Users/danny/src/ecommin-api/node_modules/pg/lib/connection.js:116:22) at Socket.emit (events.js:198:13) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17) 

Expected Behavior

Supposed to save an array of strings

Related Issues

Could this be related?
#428

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions