-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Hi there,
I desperately need deep nesting to work in a project im baseing to a large part on forms-angular. The issue is the data is not saved on level 3 and deeper. I need at least 3 levels.
To illustrate the scenario, think of your professional resume/CV you have 3 levels:
- level: Basic data on your self (name, email, phone etc.)
- level: Jobs you have had previosly (for example: worked for IBM from June 2010 to August 2012 as a proejct manager)
- level: Projects I was invoved with during me time at IBM (for example: Global Lean Project from June 2010 to January 2011 and SCRUM Train the Trainer from February 2011 to August 2012)
A simple model to illustrate:
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var projectSchema = new Schema({
projectName: {type: String},
dateFrom: {type: Date},
dateTo: {type: Date},
projectDescription: {type: String, form: {type: 'textarea', rows: 'auto'}}
});
var jobSchema = new Schema({
company: {type: String},
title: {type: String},
dateFrom: {type: Date},
dateTo: {type: Date},
jobDescription: {type: String, form: {type: 'textarea', rows: 'auto'}},
projects: {type: [projectSchema]}
});
var resumeSchema = new Schema({
surname: {type:String},
forename: {type:String},
workHistory: {type: [jobSchema]},
});
var Nesting;
var modelName = 'Nesting';
try {
Nesting = mongoose.model(modelName);
} catch(e) {
Nesting = mongoose.model(modelName, resumeSchema);
}
module.exports = Nesting;Metadata
Metadata
Assignees
Labels
No labels