-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support generating definitions for object declarations #72
Comments
I don't know exposed that well, but you probably should turn the object back into class, and only reference it using injected instance, even if it may queries a bit more annoying. Alternatively, try binding a factory where |
yep, not sure to see the real case. Also Ktor is generating content, not sure about compatibility with Koin Annotations here 🤔 |
Well, my use case is to automatically find all the tables in my code (and canonically they are objects in Exposed) so I don't have to list them manually during schema creation. It's not really about dependency injection, more like plugin discovery, so maybe it's out of scope for Koin. |
I can submit a PR if you want to |
A work around is to declare |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This seems like something similar to #107 would work here. |
yes duplicated |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is your feature request related to a problem? Please describe.
I use JetBrains Exposed and I have several tables declared like so:
I want to annotate all tables with
@Single
and then usegetAll<Table>()
:But the generated definitions for objects call a non-existent constructor and the project doesn't compile.
Describe the solution you'd like
Generate a proper definition for object declaration without calling a constructor.
Describe alternatives you've considered
I tried turning object into a class but it's not ideal since the object is used a lot in queries like so:
Target Koin project
koin-annotations
The text was updated successfully, but these errors were encountered: