{"action":"created","issue":{"url":"https://api.github.com/repos/jOOQ/jOOQ/issues/1563","labels_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/1563/labels{/name}","comments_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/1563/comments","events_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/1563/events","html_url":"https://github.com/jOOQ/jOOQ/issues/1563","id":5766280,"number":1563,"title":"Add support for Oracle SYNONYMs in source code generation","user":{"login":"lukaseder","id":734593,"avatar_url":"https://avatars.githubusercontent.com/u/734593?v=3","gravatar_id":"","url":"https://api.github.com/users/lukaseder","html_url":"https://github.com/lukaseder","followers_url":"https://api.github.com/users/lukaseder/followers","following_url":"https://api.github.com/users/lukaseder/following{/other_user}","gists_url":"https://api.github.com/users/lukaseder/gists{/gist_id}","starred_url":"https://api.github.com/users/lukaseder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukaseder/subscriptions","organizations_url":"https://api.github.com/users/lukaseder/orgs","repos_url":"https://api.github.com/users/lukaseder/repos","events_url":"https://api.github.com/users/lukaseder/events{/privacy}","received_events_url":"https://api.github.com/users/lukaseder/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jOOQ/jOOQ/labels/C:%20Code%20Generation","name":"C: Code Generation","color":"0000aa"},{"url":"https://api.github.com/repos/jOOQ/jOOQ/labels/P:%20Medium","name":"P: Medium","color":"ffaaaa"},{"url":"https://api.github.com/repos/jOOQ/jOOQ/labels/T:%20Enhancement","name":"T: Enhancement","color":"cccccc"}],"state":"open","locked":false,"assignee":{"login":"lukaseder","id":734593,"avatar_url":"https://avatars.githubusercontent.com/u/734593?v=3","gravatar_id":"","url":"https://api.github.com/users/lukaseder","html_url":"https://github.com/lukaseder","followers_url":"https://api.github.com/users/lukaseder/followers","following_url":"https://api.github.com/users/lukaseder/following{/other_user}","gists_url":"https://api.github.com/users/lukaseder/gists{/gist_id}","starred_url":"https://api.github.com/users/lukaseder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukaseder/subscriptions","organizations_url":"https://api.github.com/users/lukaseder/orgs","repos_url":"https://api.github.com/users/lukaseder/repos","events_url":"https://api.github.com/users/lukaseder/events{/privacy}","received_events_url":"https://api.github.com/users/lukaseder/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/jOOQ/jOOQ/milestones/105","labels_url":"https://api.github.com/repos/jOOQ/jOOQ/milestones/105/labels","id":735859,"number":105,"title":"Version 3.6.0","description":"","creator":{"login":"lukaseder","id":734593,"avatar_url":"https://avatars.githubusercontent.com/u/734593?v=3","gravatar_id":"","url":"https://api.github.com/users/lukaseder","html_url":"https://github.com/lukaseder","followers_url":"https://api.github.com/users/lukaseder/followers","following_url":"https://api.github.com/users/lukaseder/following{/other_user}","gists_url":"https://api.github.com/users/lukaseder/gists{/gist_id}","starred_url":"https://api.github.com/users/lukaseder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukaseder/subscriptions","organizations_url":"https://api.github.com/users/lukaseder/orgs","repos_url":"https://api.github.com/users/lukaseder/repos","events_url":"https://api.github.com/users/lukaseder/events{/privacy}","received_events_url":"https://api.github.com/users/lukaseder/received_events","type":"User","site_admin":false},"open_issues":282,"closed_issues":163,"state":"open","created_at":"2014-07-29T16:27:29Z","updated_at":"2015-02-13T12:02:20Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2012-07-22T14:07:40Z","updated_at":"2015-02-13T13:39:49Z","closed_at":null,"body":"This is a sample query showing how to resolve transitive SYNONYM chains, in case this would be needed:\r\n\r\n```sql\r\nSELECT \"s3\".\"OWNER\",\r\n  \"s3\".\"SYNONYM_NAME\",\r\n  connect_by_root \"s3\".\"TABLE_OWNER\" \"TABLE_OWNER\",\r\n  connect_by_root \"s3\".\"TABLE_NAME\" \"TABLE_NAME\",\r\n  SUBSTR(((((sys_connect_by_path(((\"s3\".\"TABLE_OWNER\"\r\n  || '.')\r\n  || \"s3\".\"TABLE_NAME\"), ' <- ')\r\n  || ' <- ')\r\n  || \"s3\".\"OWNER\")\r\n  || '.')\r\n  || \"s3\".\"SYNONYM_NAME\"), 5)\r\nFROM\r\n  (SELECT \"s2\".\"OWNER\",\r\n    \"s2\".\"SYNONYM_NAME\",\r\n    \"s2\".\"TABLE_OWNER\",\r\n    \"s2\".\"TABLE_NAME\"\r\n  FROM (\r\n    (SELECT \"SYS\".\"ALL_SYNONYMS\".\"OWNER\",\r\n      \"SYS\".\"ALL_SYNONYMS\".\"SYNONYM_NAME\",\r\n      \"SYS\".\"ALL_SYNONYMS\".\"TABLE_OWNER\",\r\n      \"SYS\".\"ALL_SYNONYMS\".\"TABLE_NAME\"\r\n    FROM \"SYS\".\"ALL_SYNONYMS\"\r\n    )\r\n  UNION\r\n    (SELECT \"SYS\".\"ALL_SYNONYMS\".\"OWNER\",\r\n      \"SYS\".\"ALL_SYNONYMS\".\"SYNONYM_NAME\",\r\n      'PUBLIC',\r\n      \"SYS\".\"ALL_SYNONYMS\".\"TABLE_NAME\"\r\n    FROM \"SYS\".\"ALL_SYNONYMS\"\r\n    )) \"s2\"\r\n  WHERE (\"s2\".\"OWNER\", \"s2\".\"SYNONYM_NAME\") <> ((\"s2\".\"TABLE_OWNER\", \"s2\".\"TABLE_NAME\"))\r\n  ) \"s3\"\r\n  START WITH EXISTS\r\n  (SELECT 1 \"one\"\r\n  FROM \"SYS\".\"ALL_OBJECTS\"\r\n  WHERE (\"s3\".\"TABLE_OWNER\"              = \"SYS\".\"ALL_OBJECTS\".\"OWNER\"\r\n  AND \"s3\".\"TABLE_NAME\"                  = \"SYS\".\"ALL_OBJECTS\".\"OBJECT_NAME\"\r\n  AND \"SYS\".\"ALL_OBJECTS\".\"OBJECT_TYPE\" <> 'SYNONYM')\r\n  )\r\n  CONNECT BY (\"s3\".\"TABLE_OWNER\" = prior \"s3\".\"OWNER\"\r\nAND \"s3\".\"TABLE_NAME\"            = prior \"s3\".\"SYNONYM_NAME\");\r\n```\r\n\r\nSee this discussion here:\r\nhttps://groups.google.com/d/topic/jooq-user/HXgEDfqJ2So/discussion\r\n\r\nUpdate this answer here upon implementation:\r\nhttp://stackoverflow.com/questions/11473358/can-jooq-generate-code-for-oracle-synonyms\r\n\r\nThe relevant documentation can be seen here:\r\nhttp://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_7001.htm\r\n"},"comment":{"url":"https://api.github.com/repos/jOOQ/jOOQ/issues/comments/74254393","html_url":"https://github.com/jOOQ/jOOQ/issues/1563#issuecomment-74254393","issue_url":"https://api.github.com/repos/jOOQ/jOOQ/issues/1563","id":74254393,"user":{"login":"lukaseder","id":734593,"avatar_url":"https://avatars.githubusercontent.com/u/734593?v=3","gravatar_id":"","url":"https://api.github.com/users/lukaseder","html_url":"https://github.com/lukaseder","followers_url":"https://api.github.com/users/lukaseder/followers","following_url":"https://api.github.com/users/lukaseder/following{/other_user}","gists_url":"https://api.github.com/users/lukaseder/gists{/gist_id}","starred_url":"https://api.github.com/users/lukaseder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukaseder/subscriptions","organizations_url":"https://api.github.com/users/lukaseder/orgs","repos_url":"https://api.github.com/users/lukaseder/repos","events_url":"https://api.github.com/users/lukaseder/events{/privacy}","received_events_url":"https://api.github.com/users/lukaseder/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T13:39:49Z","updated_at":"2015-02-13T13:39:49Z","body":"@rkettelerij : Thanks for the feedback. We've already been thinking about this a bit, and we're not yet 100% sure how to implement synonym support in generated code. We already resolve synonyms to their actual type, though. What is the use-case that you've had in mind?"}}