title: sails.js nested models
body: <p>In sails.js 0.10 I'm trying to do the following </p>
  
  <pre><code>// user.js
  module.exports = {
    attributes: {
  
      uuid: {
          type: 'string',
          primaryKey: true,
          required: true
       } ,
       profile: {
  
          firstname: 'string',
          lastname: 'string',
          birthdate: 'date',
          required: true
       }
    }
  };
  </code></pre>
  
  <p>I'm getting an error when trying to create a user and sailsJS doesn't recognize the "profile" attribute. I'm not sure if sails supports the nested JSON structure, and if it does I'm not sure how to structure it. </p>
  
  <pre><code>error: Sent 500 ("Server Error") response
  error: Error: Unknown rule: firstname
  </code></pre>
  
  <p>I've tried the following but it failed too</p>
  
  <pre><code>// user.js
  module.exports = {
    attributes: {
  
      uuid: {
          type: 'string',
          primaryKey: true,
          required: true
       } ,
       profile: {
  
          firstname: {type: 'string'},
          lastname: {type: 'string'},
          birthdate: 'date',
          required: true
       }
    }
  };
  </code></pre>
  
  <p>I know there is an attribute called "JSON" with sailsJS 0.10, but not sure how that will fit this module.</p>