23.2.3

Han Lee·2023년 2월 3일
0

TIL

목록 보기
43/43

시퀄라이즈에서 join인 include를 실행하려면 해당되는 모델을 불러와야 한다...

class CartRepository {
    constructor(cartModel, goodsModel) {
        this.cartModel = cartModel;
        this.goodsModel = goodsModel
    }
attributes: ['id', "quanitity", "userId"],
                include: [{
                    model: this.goodsModel,
                    attributes: ["name", "price", "image",],
                }],
profile
렌덤형 인간

0개의 댓글