Skip to content

Commit

Permalink
swagger error code
Browse files Browse the repository at this point in the history
  • Loading branch information
JadenKim-dev committed Aug 27, 2023
1 parent ff9448e commit 4f3a047
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 엔티티 속성에 배열 초기화시 에러

```
InitializedRelationError: Array initializations are not allowed in entity relations. Please remove array initialization (= []) from "Meet#meetToMembers". This is ORM requirement to make relations to work properly. Refer docs for more information.
```

```
constructor() {
this.meetToMembers = meetToMembers || [];
}
```

```
@AfterLoad()
async nullChecks() {
if (!this.meetToMembers) {
this.meetToMembers = [];
}
}
```
1 change: 1 addition & 0 deletions Spring/swagger_error_code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://devnm.tistory.com/27

0 comments on commit 4f3a047

Please sign in to comment.