Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subdocuments #6

Closed
jonmorehouse opened this issue Jun 29, 2013 · 1 comment
Closed

subdocuments #6

jonmorehouse opened this issue Jun 29, 2013 · 1 comment

Comments

@jonmorehouse
Copy link

Is there a way to create subdocuments with factoryLady. For some reason I keep getting a null return.

faker = require "Faker"

Upload = app.models.broadcasts.upload

factoryLady.define "upload", Upload,

bucket: "jumper-ios-test"
region: "us-west-1"
bucketKey: "2DE45F47-6782-4532-8C4C-2B4285BAC84E"
meta:

    test: faker.Lorem.words(3).join ""

This will have meta = null in my returned object

@jonmorehouse
Copy link
Author

Nevermind, figured out how to setup up a subdocument:

# initialize our jobs etc for this particular element
jobs: (cb)-> 

    # initialize element
    job = 

        id: app.seed.resources.pipelineJobId
        required: true
        responseStatus: "Completed"             

    cb [job] 

when jobs is an array of objects ...

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

No branches or pull requests

1 participant