{"action":"opened","issue":{"url":"https://api.github.com/repos/matthiasbeyer/imag/issues/194","repository_url":"https://api.github.com/repos/matthiasbeyer/imag","labels_url":"https://api.github.com/repos/matthiasbeyer/imag/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/matthiasbeyer/imag/issues/194/comments","events_url":"https://api.github.com/repos/matthiasbeyer/imag/issues/194/events","html_url":"https://github.com/matthiasbeyer/imag/issues/194","id":133528846,"number":194,"title":"[RFC] Two-Way-Linking","user":{"login":"matthiasbeyer","id":427866,"avatar_url":"https://avatars.githubusercontent.com/u/427866?v=3","gravatar_id":"","url":"https://api.github.com/users/matthiasbeyer","html_url":"https://github.com/matthiasbeyer","followers_url":"https://api.github.com/users/matthiasbeyer/followers","following_url":"https://api.github.com/users/matthiasbeyer/following{/other_user}","gists_url":"https://api.github.com/users/matthiasbeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiasbeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiasbeyer/subscriptions","organizations_url":"https://api.github.com/users/matthiasbeyer/orgs","repos_url":"https://api.github.com/users/matthiasbeyer/repos","events_url":"https://api.github.com/users/matthiasbeyer/events{/privacy}","received_events_url":"https://api.github.com/users/matthiasbeyer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matthiasbeyer/imag/labels/kind/enhancement","name":"kind/enhancement","color":"eb6420"},{"url":"https://api.github.com/repos/matthiasbeyer/imag/labels/kind/feature","name":"kind/feature","color":"eb6420"},{"url":"https://api.github.com/repos/matthiasbeyer/imag/labels/kind/infrastructure","name":"kind/infrastructure","color":"eb6420"},{"url":"https://api.github.com/repos/matthiasbeyer/imag/labels/meta/blocker","name":"meta/blocker","color":"d4c5f9"},{"url":"https://api.github.com/repos/matthiasbeyer/imag/labels/meta/decision-pending","name":"meta/decision-pending","color":"d4c5f9"},{"url":"https://api.github.com/repos/matthiasbeyer/imag/labels/meta/importance/high","name":"meta/importance/high","color":"d4c5f9"},{"url":"https://api.github.com/repos/matthiasbeyer/imag/labels/nochange/rfc","name":"nochange/rfc","color":"fef2c0"},{"url":"https://api.github.com/repos/matthiasbeyer/imag/labels/part/libimagstore","name":"part/libimagstore","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-14T10:34:24Z","updated_at":"2016-02-14T10:34:24Z","closed_at":null,"body":"I propose the concept of two-way linking.\r\n\r\nThe first idea of linking was the following:\r\n\r\n* `Link Entry:A to Entry:B` results in `Entry:A -> Entry:B`, the `A` Entry has now a link in its header section which says `imag://entry/b`\r\n\r\nThe new idea is that if an entry gets linked to another entry, links are created in both entries, to the other. So the upper example would be:\r\n\r\n\r\n* `Entry:A -> Entry:B` and `Entry:B -> Entry:A`\r\n* the `A` Entry has now a link in its header section which says `imag://entry/b`\r\n* the `B` Entry has now a link in its header section which says `imag://entry/a`\r\n\r\nIf we enforce this for all internal links, we can prevent deletion of entries which would result in \"zero-pointer links\"\r\n\r\n---\r\n\r\nThe concept is rather simple, yet powerful IMHO. Another problem is the implementation. I don't want to pull #171 into the store, though deleting an entry is possible via the store interface without further checks.\r\n\r\nWhat we would need would be an \"convenience\" layer over the store, which uses `libimaglink` to prevent deletion of entries which are still linked somehow. Implementation is a trivial task, though architecture is not in this case.\r\n\r\n---\r\n\r\n@TheNeikos comments appreciated."}}