Title: Model code generation · Issue #4 · objectbox/objectbox-python · GitHub
Open Graph Title: Model code generation · Issue #4 · objectbox/objectbox-python
X Title: Model code generation · Issue #4 · objectbox/objectbox-python
Description: Currently, the model is declared directly by constructing python objects: @Entity(id=1, uid=1) class Person: id = Id(id=1, uid=1001) first_name = Property(str, id=2, uid=1002) last_name = Property(str, id=3, uid=1003) model = objectbox.M...
Open Graph Description: Currently, the model is declared directly by constructing python objects: @Entity(id=1, uid=1) class Person: id = Id(id=1, uid=1001) first_name = Property(str, id=2, uid=1002) last_name = Property(...
X Description: Currently, the model is declared directly by constructing python objects: @Entity(id=1, uid=1) class Person: id = Id(id=1, uid=1001) first_name = Property(str, id=2, uid=1002) last_name = Property(...
Opengraph URL: https://github.com/objectbox/objectbox-python/issues/4
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Model code generation","articleBody":"Currently, the model is declared directly by constructing python objects:\r\n\r\n```python\r\n@Entity(id=1, uid=1)\r\nclass Person:\r\n id = Id(id=1, uid=1001)\r\n first_name = Property(str, id=2, uid=1002)\r\n last_name = Property(str, id=3, uid=1003)\r\n\r\nmodel = objectbox.Model()\r\nmodel.entity(Person, last_property_id=objectbox.model.IdUid(3, 1003))\r\nmodel.last_entity_id = objectbox.model.IdUid(1, 1)\r\nob = objectbox.Builder().model(model).directory(\"db\").build()\r\n```\r\n\r\nThis is a little cumbersome to write and update and thus opens up room for hard to find errors.\r\nIt would be nicer if we could generate the model similar to other ObjectBox bindings. There are two ways we do that, e.g. with a language-specific build process integration (e.g. in java, swift, dart/flutter) or with a standalone tool that does code generation (go, c, c++). \r\n\r\nIs there something like [dart source_gen](https://pub.dev/packages/source_gen) that would help with easy-to-use python code generation? \r\nIf there isn't, then adding \"FBS-\u003epython\" generation support to [objectbox-generator](https://github.com/objectbox/objectbox-generator) would be an option as well.","author":{"url":"https://github.com/vaind","@type":"Person","name":"vaind"},"datePublished":"2020-09-09T07:58:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/4/objectbox-python/issues/4"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5514bdbb-6215-e0c5-00e3-dcc9e072950f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E34C:989FD:49048A0:5F01A51:697DCBAC |
| html-safe-nonce | c70f3594d1695f6dde258dc2cffd5174e85d4a888b58753ea037559b8e18f22e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzRDOjk4OUZEOjQ5MDQ4QTA6NUYwMUE1MTo2OTdEQ0JBQyIsInZpc2l0b3JfaWQiOiI2NzM4MjI4NDIxMjc0MjI1NTgwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 98908d75a7cc2639e971e4f13f47c6e3e0040b44624666fbbc6212787d977ee9 |
| hovercard-subject-tag | issue:696558063 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/objectbox/objectbox-python/4/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1ba62b25bb36110fdf7a7395a92a2e666f2ade8a6f957dc256e9b2d4a1d35a2b/objectbox/objectbox-python/issues/4 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1ba62b25bb36110fdf7a7395a92a2e666f2ade8a6f957dc256e9b2d4a1d35a2b/objectbox/objectbox-python/issues/4 |
| og:image:alt | Currently, the model is declared directly by constructing python objects: @Entity(id=1, uid=1) class Person: id = Id(id=1, uid=1001) first_name = Property(str, id=2, uid=1002) last_name = Property(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vaind |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/objectbox/objectbox-python git https://github.com/objectbox/objectbox-python.git |
| octolytics-dimension-user_id | 22327943 |
| octolytics-dimension-user_login | objectbox |
| octolytics-dimension-repository_id | 185552041 |
| octolytics-dimension-repository_nwo | objectbox/objectbox-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 185552041 |
| octolytics-dimension-repository_network_root_nwo | objectbox/objectbox-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width