Title: Allow DiffSyncModel to be present in multiple branches from top_level · Issue #287 · networktocode/diffsync · GitHub
Open Graph Title: Allow DiffSyncModel to be present in multiple branches from top_level · Issue #287 · networktocode/diffsync
X Title: Allow DiffSyncModel to be present in multiple branches from top_level · Issue #287 · networktocode/diffsync
Description: Environment DiffSync version: 2.0.0 Proposed Functionality Allow instances of DiffSyncModels to be preset in multiple branches. This would allow a model to have an optional parent while still syncing all the objects without parents Use C...
Open Graph Description: Environment DiffSync version: 2.0.0 Proposed Functionality Allow instances of DiffSyncModels to be preset in multiple branches. This would allow a model to have an optional parent while still synci...
X Description: Environment DiffSync version: 2.0.0 Proposed Functionality Allow instances of DiffSyncModels to be preset in multiple branches. This would allow a model to have an optional parent while still synci...
Opengraph URL: https://github.com/networktocode/diffsync/issues/287
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow DiffSyncModel to be present in multiple branches from top_level","articleBody":"### Environment\n* DiffSync version: 2.0.0\n\n### Proposed Functionality\nAllow instances of DiffSyncModels to be preset in multiple branches.\nThis would allow a model to have an optional parent while still syncing all the objects without parents\n\n### Use Case\nIn the Netbox model we can have a `VirtualChassis` that includes member `Device`'s, but also have `Device`'s that are not part of a `VirtualChassis`.\nIf i split up these entities in two `DiffSyncModel`'s and make `Device` a child of the `VirtualChassis` i must choose whether i only want to sync the `Device`'s that are part of a `VirtualChassis`:\n- by making the `VirtualChassis` a top_level entry. This however will ignore all the devices that are not a child of `VirtualChassis`. Or:\n- by making the `Device` a top_level entry. This however will not create the `VirtualChassis`.\n\nIf i add both `VirtualChassis` and `Device` to top_level i get an error that `Device`'s that are a child of `VirtualChassis` are already created when it wants to add the `Device` from that top_level entry.\n\nThis is exactly the same object so i dont know why it couldnt be possible to just skip over trying to recreate this. This would also be a nicer option than what is suggested in #285 .","author":{"url":"https://github.com/Yoyasp","@type":"Person","name":"Yoyasp"},"datePublished":"2025-03-19T14:35:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/287/diffsync/issues/287"}
| 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:a8fc91ba-3f7e-0cfd-98ec-f34b97dcd298 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D0FA:1D5872:EFE644:13288B4:699103EC |
| html-safe-nonce | 5c856f0e3506518beca9c7228cb5f75d7ceda952a504d12fc1b7fa985a56a571 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMEZBOjFENTg3MjpFRkU2NDQ6MTMyODhCNDo2OTkxMDNFQyIsInZpc2l0b3JfaWQiOiI0MDA3NjE2MTY1ODQ5NDAwMzAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ff398dc6cf42e47ece23e599a6866140a5bb28c0496e7ab27571737d2bb88192 |
| hovercard-subject-tag | issue:2932035683 |
| github-keyboard-shortcuts | repository,issues,network-graph,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/networktocode/diffsync/287/issue_layout |
| twitter:image | https://opengraph.githubassets.com/56d4b8b7fb5bc01cf675cc60bf63773458bcab69fd62c324c4dac19993269157/networktocode/diffsync/issues/287 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/56d4b8b7fb5bc01cf675cc60bf63773458bcab69fd62c324c4dac19993269157/networktocode/diffsync/issues/287 |
| og:image:alt | Environment DiffSync version: 2.0.0 Proposed Functionality Allow instances of DiffSyncModels to be preset in multiple branches. This would allow a model to have an optional parent while still synci... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Yoyasp |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/networktocode/diffsync git https://github.com/networktocode/diffsync.git |
| octolytics-dimension-user_id | 13106404 |
| octolytics-dimension-user_login | networktocode |
| octolytics-dimension-repository_id | 292296974 |
| octolytics-dimension-repository_nwo | networktocode/diffsync |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 292296974 |
| octolytics-dimension-repository_network_root_nwo | networktocode/diffsync |
| 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 | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width