Created
January 28, 2015 19:00
-
-
Save suissa/dfae8fc6f62742ea6082 to your computer and use it in GitHub Desktop.
linhaDoTempoSchemaExemploRuim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{hora: [ | |
0: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 1: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 2: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 3: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 4: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 5: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 6: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 7: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 8: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 9: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
, 10: [{ | |
tipo: {type: String, default: ''} | |
, idPublicacao: Schema.Types.ObjectId | |
}] | |
]} |
Cago a indentação, pois olha vou testar aqui esse modelo, mas o "melhor" para mim seria:
hora: [
0: [],
1: []
]
Me perdi. Os exemplos com os arrays com chave:valor não são javascript válido, são? Ou estou perdendo alguma coisa?
O campo "hora" deveria ser um array associativo? Ou um objeto, talvez?
As perguntas podem ser bobas mas fiquei realmente sem entender :P
Abraço!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pq não assim?
Btw, tem umas vírgulas perdidas na frente do teu código :P