#743 - Fix issue with ElasticSearch nested path query with multiple nested path expressions

This commit is contained in:
Robin Bygrave
2016-06-20 20:57:45 +12:00
parent 6bbf93aba8
commit 3477f590dd
23 changed files with 742 additions and 6 deletions
@@ -1,9 +1,15 @@
package com.avaje.ebeaninternal.server.query;
/**
* Helper for dot notation property paths.
*/
public class SplitName {
private static final char PERIOD = '.';
/**
* Add the two name sections together in dot notation.
*/
public static String add(String prefix, String name) {
if (prefix != null) {
return prefix + "." + name;
@@ -38,10 +44,20 @@ public class SplitName {
}
}
/**
* Return the name split by last.
*/
public static String[] split(String name) {
return split(name, true);
}
/**
* Return the first part of the name.
*/
public static String begin(String name) {
return splitBegin(name)[0];
}
public static String[] splitBegin(String name) {
return split(name, false);
}