私は異なるサブ文書型の配列を持つスキーマを持っています。スキーマ以下 は一例です: VehicleSchema: let BikeSchema = new Schema({
title : { type: String, required: [true, 'title is required'] },
type : { type: String, required: tru
私はTorrentアイテムを持っていますが、保存されたユーザーコメントには '_replies'という名前のサブ文書配列があり、すべてのコメントにはユーザー応答を保存するサブ文書配列 '_replies'すべてのスキーマ定義: var CommentSchema = new Schema({
user: {
type: Schema.Types.ObjectId,
r
mgoを使用してサブ文書を選択したいとします。 選択する前に、クエリは正しい最上位レベルのドキュメントを照会する必要があります。 type User struct {
Id bson.ObjectId `bson:"_id,omitempty" json:"-" form:"-"`
Wallet Wallet `bson:"wallet,omitempty" json:"w