{"action":"opened","issue":{"url":"https://api.github.com/repos/gsbelarus/gdmn/issues/59","repository_url":"https://api.github.com/repos/gsbelarus/gdmn","labels_url":"https://api.github.com/repos/gsbelarus/gdmn/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/gsbelarus/gdmn/issues/59/comments","events_url":"https://api.github.com/repos/gsbelarus/gdmn/issues/59/events","html_url":"https://github.com/gsbelarus/gdmn/issues/59","id":393005995,"node_id":"MDU6SXNzdWUzOTMwMDU5OTU=","number":59,"title":"Создается неправильный запрос","user":{"login":"gsbelarus","id":5175764,"node_id":"MDQ6VXNlcjUxNzU3NjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5175764?v=4","gravatar_id":"","url":"https://api.github.com/users/gsbelarus","html_url":"https://github.com/gsbelarus","followers_url":"https://api.github.com/users/gsbelarus/followers","following_url":"https://api.github.com/users/gsbelarus/following{/other_user}","gists_url":"https://api.github.com/users/gsbelarus/gists{/gist_id}","starred_url":"https://api.github.com/users/gsbelarus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsbelarus/subscriptions","organizations_url":"https://api.github.com/users/gsbelarus/orgs","repos_url":"https://api.github.com/users/gsbelarus/repos","events_url":"https://api.github.com/users/gsbelarus/events{/privacy}","received_events_url":"https://api.github.com/users/gsbelarus/received_events","type":"User","site_admin":false},"labels":[{"id":1104454476,"node_id":"MDU6TGFiZWwxMTA0NDU0NDc2","url":"https://api.github.com/repos/gsbelarus/gdmn/labels/gdmn-er-bridge","name":"gdmn-er-bridge","color":"000000","default":false}],"state":"open","locked":false,"assignee":{"login":"sywka","id":3028102,"node_id":"MDQ6VXNlcjMwMjgxMDI=","avatar_url":"https://avatars1.githubusercontent.com/u/3028102?v=4","gravatar_id":"","url":"https://api.github.com/users/sywka","html_url":"https://github.com/sywka","followers_url":"https://api.github.com/users/sywka/followers","following_url":"https://api.github.com/users/sywka/following{/other_user}","gists_url":"https://api.github.com/users/sywka/gists{/gist_id}","starred_url":"https://api.github.com/users/sywka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sywka/subscriptions","organizations_url":"https://api.github.com/users/sywka/orgs","repos_url":"https://api.github.com/users/sywka/repos","events_url":"https://api.github.com/users/sywka/events{/privacy}","received_events_url":"https://api.github.com/users/sywka/received_events","type":"User","site_admin":false},"assignees":[{"login":"sywka","id":3028102,"node_id":"MDQ6VXNlcjMwMjgxMDI=","avatar_url":"https://avatars1.githubusercontent.com/u/3028102?v=4","gravatar_id":"","url":"https://api.github.com/users/sywka","html_url":"https://github.com/sywka","followers_url":"https://api.github.com/users/sywka/followers","following_url":"https://api.github.com/users/sywka/following{/other_user}","gists_url":"https://api.github.com/users/sywka/gists{/gist_id}","starred_url":"https://api.github.com/users/sywka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sywka/subscriptions","organizations_url":"https://api.github.com/users/sywka/orgs","repos_url":"https://api.github.com/users/sywka/repos","events_url":"https://api.github.com/users/sywka/events{/privacy}","received_events_url":"https://api.github.com/users/sywka/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-12-20T11:33:05Z","updated_at":"2018-12-20T11:33:05Z","closed_at":null,"author_association":"OWNER","body":"```sql\r\n  T$3.LICENCE AS F$82,\r\n  T$3.OKULP AS F$83\r\nFROM GD_CONTACT T$1\r\n  LEFT JOIN GD_COMPANY T$2 ON T$2.CONTACTKEY = T$1.ID\r\n  LEFT JOIN GD_COMPANYCODE T$3 ON T$3.CONTACTKEY = T$1.ID\r\nWHERE T$1.CONTACTTYPE = :P$1\r\n  AND T$1.PLACEKEY = :P$2\r\n\r\n{\"P$1\":3,\"P$2\":\"минск\"}\r\n```\r\n\r\nУ сущности организация **обязательно** наличие записи в таблице GD_COMPANY. Т.е. тут должен быть JOIN GD_COMPANY.\r\n\r\nИ условие для города Минска логично в сам запрос включить, а не отдельно. Чтобы потом не пришлось два запроса выполнять. Один, чтобы извлечь ИД города и второй уже для извлечения списка компаний."}}
{"actor":{"display_login":"gsbelarus"}}