Title: Renaming foreign key attributes shuffles the properties of the table attributes · Issue #516 · datajoint/datajoint-python · GitHub
Open Graph Title: Renaming foreign key attributes shuffles the properties of the table attributes · Issue #516 · datajoint/datajoint-python
X Title: Renaming foreign key attributes shuffles the properties of the table attributes · Issue #516 · datajoint/datajoint-python
Description: With these declarations: @schema class A(dj.Manual): definition=""" my_int: int my_string: varchar(64) --- """ @schema class B(dj.Manual): definition = """ -> A.proj(renamed_int='my_int') --- """ @schema class C(dj.Manual): definition = ...
Open Graph Description: With these declarations: @schema class A(dj.Manual): definition=""" my_int: int my_string: varchar(64) --- """ @schema class B(dj.Manual): definition = """ -> A.proj(renamed_int='my_int') --- """ @...
X Description: With these declarations: @schema class A(dj.Manual): definition=""" my_int: int my_string: varchar(64) --- """ @schema class B(dj.Manual): definition = ""&qu...
Opengraph URL: https://github.com/datajoint/datajoint-python/issues/516
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Renaming foreign key attributes shuffles the properties of the table attributes","articleBody":"With these declarations:\r\n```python3\r\n@schema\r\nclass A(dj.Manual):\r\n definition=\"\"\"\r\n my_int: int\r\n my_string: varchar(64)\r\n ---\r\n \"\"\"\r\n\r\n@schema\r\nclass B(dj.Manual):\r\n definition = \"\"\"\r\n -\u003e A.proj(renamed_int='my_int')\r\n ---\r\n \"\"\"\r\n\r\n@schema\r\nclass C(dj.Manual):\r\n definition = \"\"\"\r\n (renamed_int) -\u003e A(my_int)\r\n ---\r\n \"\"\"\r\n```\r\nI get this output:\r\n```python3\r\nIn [2]: import datajoint as dj \r\n\r\nIn [3]: dj.__version__ \r\nOut[3]: '0.11.0'\r\n\r\nIn [4]: from pipeline import stack # this is where I defined the classes above\r\nLoading local settings from pipeline_config.json\r\nConnecting ecobost@at-database.ad.bcm.edu:3306\r\n\r\nIn [5]: stack.A.heading \r\nOut[5]: \r\n# \r\nmy_int : int # \r\nmy_string : varchar(64) # \r\n\r\nIn [6]: stack.B.heading \r\nOut[6]: \r\n# \r\nmy_string : int # \r\nrenamed_int : varchar(64) # \r\n\r\nIn [7]: stack.C.heading \r\nOut[7]: \r\n# \r\nmy_string : int # \r\nrenamed_int : varchar(64) # \r\n\r\n\r\n```\r\n\r\nProjecting sends the renamed variable to the end of the queue but the attribute properties are not shuffled accordingly so, for instance, if I have three attributes p1:int, p2:boolean, p3:varchar and rename p2-\u003ep2' I will get p1:int, p3:boolean, p2':varchar.\r\n\r\nCheers,","author":{"url":"https://github.com/ecobost","@type":"Person","name":"ecobost"},"datePublished":"2018-11-08T02:23:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/516/datajoint-python/issues/516"}
| 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:a49b4b30-9440-b1d7-8308-d1988d2b713a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C384:A2D1C:5816B:78988:6A4D2AD2 |
| html-safe-nonce | 7594e70540581c47ac94287d700cb8a88a253b4f73ca9196e6c235086eb8cb4c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzg0OkEyRDFDOjU4MTZCOjc4OTg4OjZBNEQyQUQyIiwidmlzaXRvcl9pZCI6IjM3MDQ5NzAyOTQ2MjE3MTEwNTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a70b69cecaa2ae28fa4d9348f28839c961561d7bc29cf514cc7c0d724dcec2fd |
| hovercard-subject-tag | issue:378551078 |
| 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/datajoint/datajoint-python/516/issue_layout |
| twitter:image | https://opengraph.githubassets.com/71fb9042ba9b37d34c895ccd1513962847b91a900e2a9dc282872a0891b45570/datajoint/datajoint-python/issues/516 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/71fb9042ba9b37d34c895ccd1513962847b91a900e2a9dc282872a0891b45570/datajoint/datajoint-python/issues/516 |
| og:image:alt | With these declarations: @schema class A(dj.Manual): definition=""" my_int: int my_string: varchar(64) --- """ @schema class B(dj.Manual): definition = """ -> A.proj(renamed_int='my_int') --- """ @... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ecobost |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/datajoint/datajoint-python git https://github.com/datajoint/datajoint-python.git |
| octolytics-dimension-user_id | 2375501 |
| octolytics-dimension-user_login | datajoint |
| octolytics-dimension-repository_id | 5866704 |
| octolytics-dimension-repository_nwo | datajoint/datajoint-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 5866704 |
| octolytics-dimension-repository_network_root_nwo | datajoint/datajoint-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 | 93f17a978ee60bc4668e1d7b90e6bd2d622261fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width