You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to create a record with array property inside it ingores provided array values and saves a record without them.
P.S. edit works fine, so the issue is only with creation
Installed libraries and their versions
adminjs@5.2.1
@adminjs/express@4.0.0
@adminjs/nestjs@3.0.0
@adminjs/typeorm@2.0.0
PostgreSQL:13.3
To Reproduce
Steps to reproduce the behavior:
Click on 'Create new' on resource with array field inside
Fill array field with values
Bug: It will create record without those provided array values
Expected behavior
It should save array values on creation of a new record
Screenshots
If applicable, add screenshots to help explain your problem.
After creation:
AdminJSOptions with schema
Paste your AdminJS config with database schema if it could be related to the issue
-- auto-generated definition
create table companies
(
id uuid default gen_random_uuid() not null
constraint "PK_d4bc3e82a314fa9e29f652c2c22"
primary key,
name varchar not null,
email varchar not null,
socials jsonb,
phone_numbers text[] not null,
comments text
);
alter table companies
owner to postgres;
Additional context
Before I added default value as empty array array[]::text[] to phone_numbers it was throwing me null violation exception from postgres.
Activity
AlexanderBich commentedon Sep 13, 2021
Closed, because it's related to a different package and here's a PR for it:
SoftwareBrothers/adminjs-typeorm#16