Skip to content

PostgreSQL Enum Arrays don't convert to Javascript Array #171

@andrewcirel

Description

@andrewcirel

When I retrieve a profile (shown below) from the profiles table you will notice that the 2 enumerated arrays lookingForCountries and lookingForReligions haven't been converted to javascript arrays, but the character varying array photos has.
{
nickname: 'Cool Man Test Account',
description: 'I am the coolest man alive',
age: 40,
location: 'Oxford',
gender: 'Male',
sexuality: 'Straight',
religion: 'Christianity',
alcohol: 'Yes',
smoking: 'No',
lookingForGender: 'Female',
lookingForSexuality: 'Straight',
country: 'Any',
interests: '0',
lookingForCountries: '{"United Kingdom",Albania}',
lookingForReligions: '{Agnostism,Atheism}',
photos: [ '', '', '', '', '' ],
lookingForFromAge: '34',
lookingForToAge: 40
}
I can provide all of the table definitions, enum definitions and javascript code if you like, but this should be easy to replicate as you just create an enum type, create a column of enum array and try to retrieve the table row from Javascript.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions