Skip to content

Commit

Permalink
[SYNCOPE-1855] Rewriting JPAAnySearchDAO to reduce subqueries (#957)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Jan 23, 2025
1 parent d2760f4 commit 1b4edb7
Show file tree
Hide file tree
Showing 16 changed files with 1,478 additions and 1,912 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public abstract class AbstractAnySearchDAO implements AnySearchDAO {

protected static final Logger LOG = LoggerFactory.getLogger(AnySearchDAO.class);

protected static final String ALWAYS_FALSE_CLAUSE = "1=2";

private static final String[] ORDER_BY_NOT_ALLOWED = {
"serialVersionUID", "password", "securityQuestion", "securityAnswer", "token", "tokenExpireTime"
};
Expand Down Expand Up @@ -281,6 +283,9 @@ protected Triple<PlainSchema, PlainAttrValue, AnyCond> check(final AnyCond cond,
schema.setType(attrSchemaType);
}
}
if (schema.getType() == null || schema.getType() == AttrSchemaType.Dropdown) {
schema.setType(AttrSchemaType.String);
}

// Deal with any Integer fields logically mapping to boolean values
boolean foundBooleanMin = false;
Expand Down
10 changes: 10 additions & 0 deletions core/persistence-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@ under the License.
<artifactId>oracle-free</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Loading

0 comments on commit 1b4edb7

Please sign in to comment.