使用mongoose-schema-extend时,如果在基本模式中使用嵌套对象,则转换失败

时间:2017-06-29 10:54:01

标签: node.js mongoose mongoose-schema

我有一个基本架构 它有一个嵌入式模式名称作为其字段之一:

using System.IO

第二个架构扩展了它:

using Alphaleonis.Win32.Filesystem;

和相应的型号:

@echo off
setlocal

for /f "tokens=1* delims==" %%I in ('wmic path win32_pnpentity get caption  /format:list ^| find "SparkFun Pro Micro"') do (
    call :resetCOM "%%~J"
)

:continue

:: wmic /format:list strips trailing spaces (at least for path win32_pnpentity)
for /f "tokens=1* delims==" %%I in ('wmic path win32_pnpentity get caption  /format:list ^| find "Arduino Leonardo bootloader"') do (
    call :setCOM "%%~J"
)

:: end main batch
goto :EOF

:resetCOM <WMIC_output_line>
:: sets _COM#=line
setlocal
set "str=%~1"
set "num=%str:*(COM=%"
set "num=%num:)=%"
set port=COM%num%
echo %port%
mode %port%: BAUD=1200 parity=N data=8 stop=1
goto :continue

:setCOM <WMIC_output_line>
:: sets _COM#=line
setlocal
set "str=%~1"
set "num=%str:*(COM=%"
set "num=%num:)=%"
set port=COM%num%
echo %port%
goto :flash

:flash
avrdude -v -C./avrdude.conf -patmega32u4 -cavr109 -P%port% -b57600 -D -V -Uflash:w:./firmware.hex:i

因为投射原因失败(名称的路径类型为'真实',而它应该是'嵌套')

任何已知的方法来解决这个问题? (将模式类型从NameSchema更改为[NameSchema]似乎解决了它......但显然这不是解决此问题的正确方法)

0 个答案:

没有答案