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

Generate separate code file for each entity #525

Open
fifteenjoy opened this issue Mar 31, 2023 · 2 comments
Open

Generate separate code file for each entity #525

fifteenjoy opened this issue Mar 31, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@fifteenjoy
Copy link

fifteenjoy commented Mar 31, 2023

Is it possible that Generator generat binding code to different file according Entity file instead of only one file "objectbox.g.dart"

I have many entity files in my project. I would like to generate binding code to different file according Entity file. lIke below example
generate "bp_status_dto.g.dart" for entity file "bp_status_dto.dart", generate "company_info_dto.g.dart" for entity file " company_info_dto.dart"

WeChat Image_20230331170427

Basic info:
ObjectBox and ObjectBox generator version: 2.0.0
Flutter/Dart SDK: 3.0.0

@fifteenjoy fifteenjoy added the enhancement New feature or request label Mar 31, 2023
@greenrobot-team
Copy link
Member

This is currently not possible. Thank you for your request!

Is there any e.g. technical reason why you need this?

For others interested, please thumbs up the first post!

@fifteenjoy
Copy link
Author

Thanks for your reply. I just think if I have many entities, objectbox.g.dart will get huge, it is a little bit inconvinent to read these code. the generated code from the sceenshot in my first post is from package "json_serializable", I prefer to its way.

@greenrobot-team greenrobot-team changed the title Is it possible that Generator generat binding code to different file according Entity file ? Generate separate code file for each entity Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants