title: MongoDB - NodeJs - Maximum call stack size exceeded
body: <p>I get this error when saving the schema below in MongoDB/NodeJs (with Mongoose):
    <strong>Uncaught RangeError: Maximum call stack size exceeded.</strong></p>
  
  <p>This occurs when I add details in my schema in the Array:</p>
  
  <pre><code>var mongoose = require('mongoose');
  
  const Attribute = new mongoose.Schema({
    context: String,
    format: String,
    measurand: String,
    location: String,
    unit: String
  });
  
  const Value = new mongoose.Schema({
    value: Number,
    attributes: Attribute
  });
  
  module.exports = mongoose.model('MeterValue',{
    chargeBoxID: {type: String, ref: 'ChargingStation'},
    connectorId: Number,
    transactionId: Number,
    timestamp: Date,
    values: [Value]
  });
  </code></pre>
  
  <p>Any idea?</p>
  
  <p>Thanks in advance!
  Serge.</p>