<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Adebayo Osinulu</title>
    <description>The latest articles on DEV Community by Adebayo Osinulu (@bilard).</description>
    <link>https://dev.to/bilard</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F192173%2Faf639baa-9b60-44c6-a1b7-772a354a832c.jpg</url>
      <title>DEV Community: Adebayo Osinulu</title>
      <link>https://dev.to/bilard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bilard"/>
    <language>en</language>
    <item>
      <title>Solution to Unknown modifier: $pushAll in Mongoose</title>
      <dc:creator>Adebayo Osinulu</dc:creator>
      <pubDate>Fri, 01 May 2020 02:15:34 +0000</pubDate>
      <link>https://dev.to/bilard/solution-to-unknown-modifier-pushall-in-mongoose-13o1</link>
      <guid>https://dev.to/bilard/solution-to-unknown-modifier-pushall-in-mongoose-13o1</guid>
      <description>&lt;p&gt;I first came across this error while solving &lt;a href="https://www.freecodecamp.org"&gt;Freecodecamp's&lt;/a&gt; API and Microservices project Exercise-Tracker. I was trying to update an array in my DB using JavaScript "push" method but I kept running into this block. The solution to this is to include a settings object "usePushEach: true".&lt;br&gt;
Here's how it's done:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MySchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Schema&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;
&lt;span class="p"&gt;},{&lt;/span&gt;&lt;span class="na"&gt;usePushEach&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;br&gt;
According to the &lt;a href="https://github.com/Automattic/mongoose/issues/4455"&gt;Github&lt;/a&gt; issues, this should not be a problem from mongoose 5.0 and above, but unfortunately it's still there.Hopefully this is fixed in future release. :)&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
