Skip to content
Snippets Groups Projects
Commit ce03d4ca authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-6710 Update common-lib' (#128) from OZG-6710-update-common-lib into master

parents bb4f77b1 21d70af4
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
<parent>
<groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-dependencies</artifactId>
<version>4.3.2</version>
<version>4.5.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -92,13 +92,14 @@
<goal>run</goal>
</goals>
<configuration>
<protocVersion>${protobuf.version}</protocVersion>
<outputTargets>
<outputTarget>
<type>java</type>
</outputTarget>
<outputTarget>
<type>grpc-java</type>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.60.0</pluginArtifact>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${protoc-gen.version}</pluginArtifact>
</outputTarget>
</outputTargets>
</configuration>
......
......@@ -96,7 +96,7 @@ class UserRepository implements PanacheMongoRepository<User> {
public Stream<User> findUsersByDeleted(String query, boolean deleted, int limit) {
var params = Parameters.with(PARAM_NAME_SEARCH_BY, toRegex(query)).and(PARAM_NAME_DELETED, deleted);
return find(SEARCH_QUERY + AND_DELETED, params).range(0, limit - 1).stream();
return find("(" + SEARCH_QUERY + ")" + AND_DELETED, params).range(0, limit - 1).stream();
}
public Stream<User> findUsersByDeletedAndOrganisationsEinheitId(String query, boolean deleted, String organisationsEinheitId, int limit) {
......@@ -104,7 +104,7 @@ class UserRepository implements PanacheMongoRepository<User> {
.and(PARAM_NAME_DELETED, deleted)
.and(PARAM_NAME_ORGANISATIONS_EINHEIT_ID, organisationsEinheitId);
return find(SEARCH_QUERY + AND_DELETED + AND_ORGANISATIONS_EINHEIT_ID_IN, params).range(0, limit - 1).stream();
return find("(" + SEARCH_QUERY + ")" + AND_DELETED + AND_ORGANISATIONS_EINHEIT_ID_IN, params).range(0, limit - 1).stream();
}
String toRegex(String query) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment