Skip to content

Commit a309070

Browse files
committed
Exclude properties ending with 'alternateNames.size'
1 parent 2954d4e commit a309070

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

gemma-core/src/main/java/ubic/gemma/persistence/service/AbstractFilteringVoEnabledDao.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ public void unregisterEntity( String prefix, Class<?> entityClass ) {
218218
throw new IllegalArgumentException( "A non-empty prefix must end with a '.' character." );
219219
}
220220
if ( entityByPrefix.remove( prefix, entityClass ) ) {
221-
if ( !filterableProperties.removeIf( s -> s.startsWith( prefix ) ) ) {
221+
if ( filterableProperties.removeIf( s -> s.startsWith( prefix ) ) ) {
222+
// remove entities registered under sub-prefixes
223+
entityByPrefix.keySet().removeIf( p -> p.startsWith( prefix ) );
224+
} else {
222225
log.warn( String.format( "While unregistering %s %s, no properties were removed. Is it possible that a parent prefix was already removed?",
223226
entityClass.getName(), summarizePrefix( prefix ) ) );
224227
}

gemma-core/src/main/java/ubic/gemma/persistence/service/expression/arrayDesign/ArrayDesignDaoImpl.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,8 @@ private Query finishFilteringQuery( String queryString, @Nullable Filters filter
10651065
protected void configureFilterableProperties( FilterablePropertiesConfigurer configurer ) {
10661066
super.configureFilterableProperties( configurer );
10671067
configurer.registerProperty( "taxon" );
1068-
configurer.unregisterProperty( "alternateNames.size" );
1068+
// this is not useful, unless we add an alias to the alternate names
1069+
configurer.unregisterProperties( p -> p.endsWith( "alternateNames.size" ) );
10691070
// because the ArrayDesign is the root property, and we allow at most 3 level, some of the recursive properties
10701071
// (i.e. referring to another AD) will properties in a bunch of useless prefix such as mergedInto.mergedInto. To
10711072
// disallow this, we remove those properties.

gemma-core/src/main/java/ubic/gemma/persistence/service/expression/experiment/ExpressionExperimentDaoImpl.java

+3
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,9 @@ protected void configureFilterableProperties( FilterablePropertiesConfigurer con
16631663
configurer.registerEntity( "primaryPublication.pubAccession.", DatabaseEntry.class, 2 );
16641664
configurer.unregisterProperty( "primaryPublication.pubAccession.Uri" );
16651665

1666+
// this is not useful, unless we add an alias to the alternate names
1667+
configurer.unregisterProperties( p -> p.endsWith( "alternateNames.size" ) );
1668+
16661669
// attached terms
16671670
configurer.registerAlias( "characteristics.", CHARACTERISTIC_ALIAS, Characteristic.class, null, 1 );
16681671
configurer.unregisterProperty( "characteristics.originalValue" );

0 commit comments

Comments
 (0)