SoftwareBrothers / adminjs-sequelizejs

Sequelizejs adapter for AdminBro
MIT License
27 stars 34 forks source link

Add support for nested objects #45

Closed wojtek-krysiak closed 4 years ago

wojtek-krysiak commented 4 years ago

Mixed type in AdminBro.

In both jsonb and array fields:

const Painting = sequelize.define(
  'paintings',
  {
    id: {
      type: Sequelize.BIGINT,
      primaryKey: true,
      autoIncrement: true
    },
    title: {
      type: Sequelize.STRING
    },
    tags: {
      type: Sequelize.ARRAY({
        type: Sequelize.BIGINT,
        references: {
          model: Tag,
          key: 'id'
        }
      }),
    }
  })
wojtek-krysiak commented 4 years ago

duplicates: https://github.com/SoftwareBrothers/admin-bro/issues/576