zoukankan      html  css  js  c++  java
  • mongodb tip-1

    mongodb 

    模糊查询:

    {people_name:{$regex:/杨/}}

     

     

    更新返回更新后的数据:

     NewContract.findByIdAndUpdate(id, data, { new: true, select: 'attachment no' }, cb)

     

     

    关联查询:

    People.findById(people_id)

                    .populate({

                        path: 'it_0002',

                        model: 'IT_0002',

                        select: 'address_type_code address'

                    })

                    .populate({

                        path: 'company',

                        model: 'Company',

                        select: 'company_name nature province_name city_name tell postcode address'

                    })

     

     

     

  • 相关阅读:
    Insertion Sort List
    Same Tree
    Binary Tree Level Order Traversal II
    Binary Tree Level Order Traversal
    ZigZag Conversion
    Reverse Integer
    String to Integer (atoi)
    Palindrome Number
    eclipse 导入tortoiseSVN检出项目,不显示svn信息(eclipse安装svn插件)
    exception ORA-00918: 未明确定义列
  • 原文地址:https://www.cnblogs.com/xuezizhenchengxuyuan/p/6260400.html
Copyright © 2011-2022 走看看