{"action":"opened","issue":{"url":"https://api.github.com/repos/gjrwebber/spring-data-gremlin/issues/37","labels_url":"https://api.github.com/repos/gjrwebber/spring-data-gremlin/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/gjrwebber/spring-data-gremlin/issues/37/comments","events_url":"https://api.github.com/repos/gjrwebber/spring-data-gremlin/issues/37/events","html_url":"https://github.com/gjrwebber/spring-data-gremlin/issues/37","id":107702937,"number":37,"title":"Circular reference detection","user":{"login":"binaryblake","id":1986816,"avatar_url":"https://avatars.githubusercontent.com/u/1986816?v=3","gravatar_id":"","url":"https://api.github.com/users/binaryblake","html_url":"https://github.com/binaryblake","followers_url":"https://api.github.com/users/binaryblake/followers","following_url":"https://api.github.com/users/binaryblake/following{/other_user}","gists_url":"https://api.github.com/users/binaryblake/gists{/gist_id}","starred_url":"https://api.github.com/users/binaryblake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaryblake/subscriptions","organizations_url":"https://api.github.com/users/binaryblake/orgs","repos_url":"https://api.github.com/users/binaryblake/repos","events_url":"https://api.github.com/users/binaryblake/events{/privacy}","received_events_url":"https://api.github.com/users/binaryblake/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-22T12:17:44Z","updated_at":"2015-09-22T12:17:44Z","closed_at":null,"body":"If I have a vertex that has an edge to another vertex of the same type, it would be nice to prevent infinite looping on query. Simplified Example:\r\n\r\n```\r\n@Vertex\r\nclass Question{\r\n  @Id\r\n  String id\r\n  @LinkVia\r\n  Set<SubQuestion> questions\r\n}\r\n\r\n@Edge\r\nclass SubQuestion{\r\n  @Id\r\n  String id\r\n  @FromVertex\r\n  Question from\r\n  @ToVertex\r\n  Question to\r\n}\r\n```\r\n\r\nIf I create edges between questions AND set the FromVertex, I will get a circular reference and a findOne() query will be in an infinite loop. I can get around this by only setting ToVertex, but then I lose a direction. Be able to fetch lazily might also be a good solution here, related to #6 "}}