Skip to content

Conversation

@rafakato
Copy link

I've added support for declaring and attaching files in nested properties.

Defining nested fields:

schema.plugin(crate, {
    storage: storage,
    fields: {
       'nested.attachments': {}
    }
});

Attaching to nested field:

model.attach('nested.attachment', {path: '/path/to/file'})

I've added the dependency for lodash to manage get and set nested fields from string, I try to make it work with mpath that is the native from mongoose but the set method was not working as expected, it was not setting the nested property.

@coveralls
Copy link

coveralls commented Jan 24, 2017

Coverage Status

Coverage decreased (-87.2%) to 12.821% when pulling c282046 on rafakato:nested-properties into 13aa291 on achingbrain:master.

@coveralls
Copy link

coveralls commented Jan 24, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 173d6ff on rafakato:nested-properties into 13aa291 on achingbrain:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants