Skip to content

Feature Request: Select Event subscribers  #2266

@mikemcguire

Description

@mikemcguire

Issue type: Feature request

Having a subscriber that triggers before/after a query/find event. In my current implementation the existing "before" subscribers are interacting with my Permissions class to enforce multi-tenant data separation, attaching the tenant ID to the data set for specific roles. It would also be useful to enforce this on get requests. Having this functionality in these hooks provides the ability for me to keep this logic in an area of the app that doesn't see a lot of maintenance, important to maintain the stability of our multitenant implementation, while also providing a DRY enforcement for all requests. This seems like an ideal use-case for the subscribers, but without some type of select/find/query event the functionality is incomplete.

That being said I'm new to Typeorm and may not be seeing the bigger picture, there may very well have been a good reason to avoid adding an event like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions