Title: declarative bug · Issue #17 · unalloc/sqlautocode · GitHub
Open Graph Title: declarative bug · Issue #17 · unalloc/sqlautocode
X Title: declarative bug · Issue #17 · unalloc/sqlautocode
Description: I have an sqlite db with only 1 table without any primary key created with ydbf from a legacy .dbf file. If i run sqlautocode without -d, it's ok, but when i run it with -d, i get: tamas@tami:~/svn/berado/utils/dbf2gdb$ sqlautocode -d sq...
Open Graph Description: I have an sqlite db with only 1 table without any primary key created with ydbf from a legacy .dbf file. If i run sqlautocode without -d, it's ok, but when i run it with -d, i get: tamas@tami:~/svn...
X Description: I have an sqlite db with only 1 table without any primary key created with ydbf from a legacy .dbf file. If i run sqlautocode without -d, it's ok, but when i run it with -d, i get: tamas@tami:~...
Opengraph URL: https://github.com/unalloc/sqlautocode/issues/17
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"declarative bug","articleBody":"```\nI have an sqlite db with only 1 table without any primary key created with\nydbf from a legacy .dbf file.\nIf i run sqlautocode without -d, it's ok, but when i run it with -d, i get:\n\ntamas@tami:~/svn/berado/utils/dbf2gdb$ sqlautocode -d\nsqlite:///converted.db -o converted.py\nTraceback (most recent call last):\n File \"/usr/bin/sqlautocode\", line 8, in \u003cmodule>\n load_entry_point('sqlautocode==0.5.3', 'console_scripts', 'sqlautocode')()\n File \"/usr/lib/python2.6/site-packages/sqlautocode/main.py\", line 21, in main\n emit(repr(factory))\n File \"/usr/lib/python2.6/site-packages/sqlautocode/declarative.py\", line\n115, in __repr__\n models = self.models\n File \"/usr/lib/python2.6/site-packages/sqlautocode/declarative.py\", line\n143, in models\n return sorted((self.create_model(table) for table in\nself.get_non_many_to_many_tables()), by__name__)\n File \"/usr/lib/python2.6/site-packages/sqlautocode/declarative.py\", line\n143, in \u003cgenexpr>\n return sorted((self.create_model(table) for table in\nself.get_non_many_to_many_tables()), by__name__)\n File \"/usr/lib/python2.6/site-packages/sqlautocode/declarative.py\", line\n151, in create_model\n class Temporal(self.DeclarativeBase):\n File \"/usr/lib/python2.6/site-packages/sqlalchemy/ext/declarative.py\",\nline 561, in __init__\n _as_declarative(cls, classname, dict_)\n File \"/usr/lib/python2.6/site-packages/sqlalchemy/ext/declarative.py\",\nline 554, in _as_declarative\n cls.__mapper__ = mapper_cls(cls, table, properties=our_stuff,\n**mapper_args)\n File \"/usr/lib/python2.6/site-packages/sqlalchemy/orm/__init__.py\", line\n751, in mapper\n return Mapper(class_, local_table, *args, **params)\n File \"/usr/lib/python2.6/site-packages/sqlalchemy/orm/mapper.py\", line\n198, in __init__\n self._configure_pks()\n File \"/usr/lib/python2.6/site-packages/sqlalchemy/orm/mapper.py\", line\n439, in _configure_pks\n \"key columns for mapped table '%s'\" % (self,\nself.mapped_table.description))\nsqlalchemy.exc.ArgumentError: Mapper Mapper|Temporal|jovelem could not\nassemble any primary key columns for mapped table 'jovelem'\n\n```\n\nOriginal issue reported on code.google.com by `gbtami` on 18 Sep 2009 at 8:54\n","author":{"url":"https://github.com/GoogleCodeExporter","@type":"Person","name":"GoogleCodeExporter"},"datePublished":"2015-12-02T03:31:27Z","url":"https://github.com/unalloc/sqlautocode/issues/17"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:e26b48aa-7b6c-4bf1-a4cd-218cbafd0b24 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C080:38A9D8:5849B9:75B555:6B06252C |
| html-safe-nonce | 23f7900562df07913d60d7c041a3be78ed229f785c5b4c9efd5057fdbc2c0ddd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDgwOjM4QTlEODo1ODQ5Qjk6NzVCNTU1OjZCMDYyNTJDIiwidmlzaXRvcl9pZCI6Ijg0Njg5OTQxMTI5NDYwNTQ0NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c912017e68c5dc42e3ddcb17faad695c19946d29a0836be0db44ecaacc6c88f5 |
| hovercard-subject-tag | issue:119859464 |
| 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/unalloc/sqlautocode/17/issue_layout |
| twitter:image | https://opengraph.githubassets.com/89ee6bca7697e752cf6ec18455c239be187e5975890ac71be98cc11f8dc5c229/unalloc/sqlautocode/issues/17 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/89ee6bca7697e752cf6ec18455c239be187e5975890ac71be98cc11f8dc5c229/unalloc/sqlautocode/issues/17 |
| og:image:alt | I have an sqlite db with only 1 table without any primary key created with ydbf from a legacy .dbf file. If i run sqlautocode without -d, it's ok, but when i run it with -d, i get: tamas@tami:~/svn... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GoogleCodeExporter |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9e10bb0ecc0bd0f8692aa89586ee9b54e498d7ab9f244a44cdb5b93653a125ce |
| turbo-cache-control | no-preview |
| go-import | github.com/unalloc/sqlautocode git https://github.com/unalloc/sqlautocode.git |
| octolytics-dimension-user_id | 2229516 |
| octolytics-dimension-user_login | unalloc |
| octolytics-dimension-repository_id | 47234827 |
| octolytics-dimension-repository_nwo | unalloc/sqlautocode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 47234827 |
| octolytics-dimension-repository_network_root_nwo | unalloc/sqlautocode |
| 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 | 32e57d5cc2ce6ce92ec6dceb65858344750c27c2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width