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

Better approach than producer method to inject specific MongoDB Collections #5

Open
emmanuelbernard opened this issue Jan 27, 2015 · 0 comments
Labels

Comments

@emmanuelbernard
Copy link
Collaborator

Today, if I want a typsafe inject, I do the following

// Definition
class SomeProducer {
    @Inject @Mongo(db="retail", collection="orders") @OrderCollection
    DBCollection collection;
}

// Usage
class SomeBusinessObject {
    @Inject @OrderCollection
    DBCollection orders;
}

Is that correct?
Is that considered the best approach or should we offer some helper / alternative solution in the framework?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant