B
B
bzotsss2021-09-26 18:43:22
Node.js
bzotsss, 2021-09-26 18:43:22

How to set field of type ARRAY(array) in sequelize, express model?

Hello everyone, I have a controller model. I want one of the fields of this model to be an array of numbers, for example [1,2,3]. I also use . To DataTypesdo this, I indicated that this field should be
DataTypes.ARRAY(DataTypes.INTEGER)
. At the same time, I get an error Can not map()
. What am I doing wrong? Googling the issue didn't help :(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2014-10-21
@jcmvbkbc

The area of ​​a triangle is equal to the product of the lengths of the sides - this is a new word in geometry. Heron would be interested.

B
brutal_lobster, 2014-10-21
@brutal_lobster

1. When creating a triangle, it would be nice to immediately indicate its sides.
2. Checking the correctness of the triangle ( 1 - 1 - 100 )
3. Why internal?
4. Serialization, formatting ..
5. The calculation of the area is some kind of fundamentally new

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question