efforthye / etherscat_block_explorer_react

personal geth project / etherscan : https://etherscan.io/
2 stars 0 forks source link

EagerLoadingError #19

Open efforthye opened 1 year ago

efforthye commented 1 year ago

EagerLoadingError [SequelizeEagerLoadingError]: Transaction is associated to Block using an alias. You must use the 'as' keyword to specify the alias within your include statement.

efforthye commented 1 year ago

include로 associate DB를 가져올 때 객체 안의 model 키 값으로 불러와야 한다.

efforthye commented 1 year ago

또한 models에서 정의한 연결 as(alias)를 include에 추가로 불러와 주어야 한다. include: { model: Transaction, as: "BlockTransactions" },

-> 에러 해결됨