Skip to content

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

Description

@emmanuelbernard

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?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions