Trying to make a PostgreSQL field with a list of foreign keys in Django

后端 未结 2 1256
后悔当初
后悔当初 2021-01-07 23:11

Here is what I\'m trying to do: Make a model in Django that is a PostgreSQL array (database specific type), which contains foreign keys to another model.



        
2条回答
  •  说谎
    说谎 (楼主)
    2021-01-07 23:51

    You have to use ManyToManyField, ArrayField can't be related with another model.

提交回复
热议问题