MongoDB에서 아래의 형식으로 새 콜렉션을 작성하려고했습니다. 그러나 나는 그렇게 할 수 없다.MongoDB에서 콜렉션을 생성 할 수 없습니다.
다음은 내 컬렉션 생성 코드입니다. 누구든지 동일한 코드 묶음을 시도하십시오. & 컬렉션 생성을 시도하십시오. 같은 것을 도와주세요. 미리 감사드립니다.
db.MasterAccount_AccountUser.insert
(
{
MasterAccountID: 100,
MasterAccountName: 'LMS Plumber Inc',
AccountOwner: 'John',
AccountUser:[
{
AccountUserID: 1001,
AccountUserName: 'John',
AccountUserRole: 'Admin',
AccountUserEmailID: '[email protected]',
AccountUserPhoneNumber: '8132546363'
},
{
AccountUserID: 1002,
AccountUserName: 'Matt',
AccountUserRole: 'User',
AccountUserEmailID: '[email protected]',
AccountUserPhoneNumber: '8132546362'
},
{
AccountUserID: 1003,
AccountUserName: 'Dan',
AccountUserRole: 'User',
AccountUserEmailID: '[email protected]',
AccountUserPhoneNumber: '8132568945'
}
]
}
)
감사합니다.
감사합니다. 수정 된 코드 블록과 함께 이번에는 오류없이 코드가 잘 실행됩니다. 그러나 "show.collections"를 요청하면 새로운 컬렉션 이름이 표시되지 않습니다. MasterAccount_AccountUser. – 0nir