First level suppor for RsqlQueryFields shortcut support (#2686)

* now it is possible to have a showrtcut for a sub attributes (i.e. calling it directly with enum name, e.g. type -> type.key) with directly specifying the defaultSubEntityAttribute
* no need to have single sub attribute in order to have a default sub attribute
* added TYPE search field for TargetFields (sinonim of targettype)
* targettype is deprecated - to be decided if and when to be removed
* returned back "type" direct search (with meaning type.key) for DistributionSet and SoftwareModule as non-depricated
* add serche with "type" as type.key for Target

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-09-23 10:56:26 +03:00
committed by GitHub
parent d98ab779a2
commit 9ab0a8628e
11 changed files with 55 additions and 42 deletions

View File

@@ -143,8 +143,7 @@ class RsqlSoftwareModuleFieldTest extends AbstractJpaIntegrationTest {
}
@Test
void testFilterByTypeBackwardCompatibility() {
assertThat(RsqlUtility.SM_DS_SEARCH_BY_TYPE_BACKWARD_COMPATIBILITY).isTrue();
void testFilterByTypeShortcut() {
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "==" + TestdataFactory.SM_TYPE_APP, 2);
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "!=" + TestdataFactory.SM_TYPE_APP, 4);
assertRSQLQuery(SoftwareModuleFields.TYPE.name() + "==noExist*", 0);