[#6223] Field.contains(T) doesn't delegate to Field.contains(Field<T>) when using plain SQL
This commit is contained in:
parent
9eb7a734a3
commit
d76d0d94fc
@ -831,9 +831,13 @@ abstract class AbstractField<T> extends AbstractQueryPart implements Field<T> {
|
||||
return likeRegex(pattern).not();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public final Condition contains(T value) {
|
||||
return new Contains<T>(this, value);
|
||||
if (value instanceof Field)
|
||||
return contains((Field) value);
|
||||
else
|
||||
return new Contains<T>(this, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -851,9 +855,13 @@ abstract class AbstractField<T> extends AbstractQueryPart implements Field<T> {
|
||||
return contains(value).not();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public final Condition containsIgnoreCase(T value) {
|
||||
return new ContainsIgnoreCase<T>(this, value);
|
||||
if (value instanceof Field)
|
||||
return containsIgnoreCase((Field) value);
|
||||
else
|
||||
return new ContainsIgnoreCase<T>(this, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -871,8 +879,12 @@ abstract class AbstractField<T> extends AbstractQueryPart implements Field<T> {
|
||||
return containsIgnoreCase(value).not();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public final Condition startsWith(T value) {
|
||||
if (value instanceof Field)
|
||||
return startsWith((Field) value);
|
||||
|
||||
Field<String> concat = DSL.concat(Tools.escapeForLike(value), inline("%"));
|
||||
return like(concat, Tools.ESCAPE);
|
||||
}
|
||||
@ -883,8 +895,12 @@ abstract class AbstractField<T> extends AbstractQueryPart implements Field<T> {
|
||||
return like(concat, Tools.ESCAPE);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public final Condition endsWith(T value) {
|
||||
if (value instanceof Field)
|
||||
return endsWith((Field) value);
|
||||
|
||||
Field<String> concat = DSL.concat(inline("%"), Tools.escapeForLike(value));
|
||||
return like(concat, Tools.ESCAPE);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user