Skip to content
Snippets Groups Projects
Unverified Commit 6d206b55 authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge pull request #1960 from raman-bt/6564-error-creating-account

Added alias for inner query as required by Postgres
parents 80381b99 af068eda
No related branches found
No related tags found
No related merge requests found
...@@ -1323,7 +1323,7 @@ public List<Account> getAccountsRelatedToArtifact(BlackboardArtifact artifact) t ...@@ -1323,7 +1323,7 @@ public List<Account> getAccountsRelatedToArtifact(BlackboardArtifact artifact) t
+ " SELECT DISTINCT (account_id), account_type_id, account_unique_identifier" + " SELECT DISTINCT (account_id), account_type_id, account_unique_identifier"
+ " FROM accounts" + " FROM accounts"
+ " JOIN account_relationships ON account2_id = account_id" + " JOIN account_relationships ON account2_id = account_id"
+ " WHERE relationship_source_obj_id = %d)", artifact.getId(), artifact.getId()); + " WHERE relationship_source_obj_id = %d) AS unionOfRelationships", artifact.getId(), artifact.getId());
try (Statement stmt = connection.createStatement(); ResultSet rs = stmt.executeQuery(query)) { try (Statement stmt = connection.createStatement(); ResultSet rs = stmt.executeQuery(query)) {
while (rs.next()) { while (rs.next()) {
Account.Type accountType = null; Account.Type accountType = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment