블로그 생성할 때 user 객체를 넣으면, 리턴 값으로 user 객체를 받을 수 있는 이점이 있다고 해서, 전달해봤는데요. 아래와 같은 에러가 발생합니다. blog validation failed: user: Cast to ObjectId failed for value 블로그 생성시 user 가 아닌 userId 를 전달하면 정상적으로 블로그가 생성되나, 리턴값에는 user 객체가 아닌 userId 가 매핑되어 있습니다. mongoose 버전이 올라가면서 변경된 사항이 있어서 발생한 이슈일까요?
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요! 좋은 강의 감사드립니다 ㅎㅎ (강의에서 나온대로 패키지와 클래스를 구성한 상태입니다.) 혹시 DTO를 framework 패키지에 넣는 이유가 있을까요? 저는 개인적으로 UseCase나 InputPort에 framework 패키지에 대한 import가 생기기 때문에 의존성이 생긴다고 판단해 application에 DTO를 생성할 것 같습니다. 혹시 제가 생각하지 못한 다른 이유가 있는지 궁금합니다!
실제 캐글 문제 풀고 제출해보며 성능 개선 기법 익히기8 강의의 3:20 부분에서 궁금한 점이 있어 질문 올립니다. 해당 코드에서는 저장된 model_efficientnet-b7_without_scheduler_adam_1e5_epoch20.pth 모델을 load할 때, model_efficientb7 = deepcopy(model) PATH = '/content/drive/MyDrive/Colab Notebooks/Dataset/Dogs vs Cats/' model_efficientb7.load_state_dict(torch.load(PATH + 'model_efficientnet-b7_without_scheduler_adam_1e5_epoch20.pth')) 다음과 같이 model의 뼈대를 다시 구성한 후, load_state_dict 메소드를 이용하여 가중치 값을 업데이트 하였습니다. 이때, model_efficientb7 = deepcopy(model) 와 같이 그냥 model 객체가 아닌, deepcopy(model)을 사용한 특별한 이유가 있는지 궁금합니다. deepcopy를 사용할 경우, 'model_efficientb7'과 'model' 객체는 서로 독립적인 객체로 유지된다는 점은 파악할 수 있었는데요, model_efficientb7에 적용되는 변화와는 별개로 model 객체 자체를 유지하려는 의도에서 사용한 것이라고 보면 되는지 여쭙고 싶습니다!
이미 Schema 정의 할 때 age 를 number 로 했기 때문에, 디비에 저장할 때 number 값을 전달하지 않으면 에러가 발생해서 catch 에서 처리할 수 있을거 같은데요. 업데이트 전에 필드를 validation 하면 모든 필드에 대해서 일일히 다 해줘야 할 것 같은데, 그렇게 하는 이유가 있을까요? 그리고, catch 에러에서 number 값을 입력하지 않아서 발생한 오류임을 알 수 있는 방법(e.g., 에러 코드)이 있나요?
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 df = pd.concat([X_train,y_train['Reached.on.Time_Y.N']],axis=1) cols = X_train.select_dtypes(include='object').columns for col in cols : le = LabelEncoder() X_train[col] = le.fit_transform(X_train[col]) X_test[col] = le.transform(X_test[col]) x_train과 y_train을 합치는 이유는 x_train 에는 값을 가지고 있지 않지만 y_train에는 값을 가질 수도 있기 때문에 합치는 거라고 배웠던 것 같은데 맞나요? 그렇다면 cols = X_train.select_dtypes(include='object').columns 해당구문은 cols = df.select_dtypes(include='object').columns 이렇게 합쳐진 df에서 cols를 구해야 할 것 같다고 생각이 드는데 틀렸나요 ? 혹은 해당 데이터는 x_train과 y_train 컬럼 값에 차이가 없기 때문에 X_train 로 그냥 진행이된건가요 ?! 제가 이해한게 맞는지 잘 모르겠어서 질문합니다.
자기 자신을 기준으로 하는 행렬에서 루트를 기준으로 하는 행렬로 변환하기 위해서는 "루트까지 부모의 월드를 곱한다" 라고 말씀해주셨는데, "부모의 월드"라는게 잘 이해가 가지 않습니다. 월드 행렬이 왜 개입하는건가요 ? 루트까지 부모의 SRT를 곱한다가 맞는 것 아닌가요 ?? 만약 루트까지 부모의 월드 행렬을 곱한다면 그냥 자기 자신의 월드 행렬이 나오지 않나요 ? 이해가 잘 가지 않아 질문드립니다.
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] 검증오류가 날 시 BindingResult에 의해 들어가는 게 아니라, 저렇게 인자로 받는 건 이미 모델에 들어가 주는거죠?
.travis.yml 파일 작성 후에 깃 커밋하고 sudo: required language: generic services: - docker before-install: - echo "start creating an image with dockerfile" - docker build -t gonieyoo720/docker-react-app -f Dockerfile.dev . script: - docker run -e CI=true gonieyoo720/docker-react-app npm run test -- --coverage after_success: - echo "Test Success" 트래비스에까지 테스트를 돌렸는데, 몇번을 수정하고 해봐도 트래비스에서 테스트를 통과하지 못하네요. 오타 확인도 많이 해봤는데, 해결을 못하고있습니다. 테스트에 중지되지않은 비동기작업이 있다고 오류를 해결하려면 devDependency를 추가하라는데, 어떻게 해야할까요 --------------------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s --------------------|---------|----------|---------|---------|------------------- All files | 8.33 | 0 | 33.33 | 8.33 | App.js | 100 | 100 | 100 | 100 | index.js | 0 | 100 | 100 | 0 | 7-17 reportWebVitals.js | 0 | 0 | 0 | 0 | 1-8 --------------------|---------|----------|---------|---------|------------------- Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 2.06 s Ran all test suites. Jest did not exit one second after the test run has completed. This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue. One of your dependencies, babel-preset-react-app, is importing the "@babel/plugin-proposal-private-property-in-object" package without declaring it in its dependencies. This is currently working because "@babel/plugin-proposal-private-property-in-object" is already in your node_modules folder for unrelated reasons, but it may break at any time. babel-preset-react-app is part of the create-react-app project, which is not maintianed anymore. It is thus unlikely that this bug will ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies to work around this error. This will make this message go away. The command "docker run -e CI=true gonieyoo720/docker-react-app npm run test -- --coverage" exited with 1. Done. Your build exited with 1.
카테고리를 계단식 재귀 형태로 불러서 쓰고싶은데 해당 코드를 호출할 경우 영속성 문제로 조회가 제대로 되지 않습니다.. 혹시 해당 문제에 대한 답을 알고계시면 답변 부탁드려요 ㅠ // 오류 내용 Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed: java.lang.StackOverflowError] with root cause // 엔티티 @Entity data class VocCategoryEntity( @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "cate_seq", nullable = false) var cateSeq: Long? = null, @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "parent_cate_seq") var parentCategory: VocCategoryEntity? = null, @OneToMany( mappedBy = "parentCategory", targetEntity = VocCategoryEntity::class ) var childrenCategory: List<VocCategoryEntity>? = ArrayList() ) // 리포지토리 query .selectFrom(vocCategoryEntity) .leftJoin(vocCategoryEntity.childrenCategory) .fetchJoin() .fetch()