Changeset 6936


Ignore:
Timestamp:
Jun 24, 2015, 10:46:55 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #1950: Add support for any-to-any link filters in table lists views

Fixes an issue with creating an incorrect left join when the any-to-any link name contained a '.' character.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/ItemContext.java

    r6930 r6936  
    5757import java.util.Arrays;
    5858import java.util.Collection;
     59import java.util.Collections;
    5960import java.util.Iterator;
    6061import java.util.Map;
     
    14511452    this.propertyInspector = filter;
    14521453  }
     1454 
     1455  // Do not auto-join queries containing filter properties with the following prefixes
     1456  private static final Set<String> NO_AUTO_JOIN_PREFIXES = new HashSet<String>(
     1457    Arrays.asList("£", "&", "!", "¤", "|"));
    14531458 
    14541459  /**
     
    16241629              {
    16251630                String filterProperty = filter.getProperty();
    1626                 if (filterProperty != null && !filterProperty.startsWith("£") && !filterProperty.startsWith("&") && !filterProperty.startsWith("!") && !filterProperty.startsWith("¤"))
     1631                if (filterProperty != null && !NO_AUTO_JOIN_PREFIXES.contains(filterProperty.substring(0,  1)))
    16271632                {
    16281633                  int lastDotIndex = filterProperty.lastIndexOf('.');
Note: See TracChangeset for help on using the changeset viewer.