mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-16 21:01:10 +08:00
Bump Hibernate version
This commit is contained in:
parent
1b3ccbfafe
commit
a6d6435446
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<hibernate.version>4.3.7.Final</hibernate.version>
|
||||
<hibernate.version>4.3.11.Final</hibernate.version>
|
||||
<hibernate.validator.version>4.3.1.Final</hibernate.validator.version>
|
||||
<eclipselink.version>2.6.0-RC1</eclipselink.version>
|
||||
<osgi.import.package>javax.persistence.*;version="[1.1,3)",${osgi.import.package.root}</osgi.import.package>
|
||||
@ -366,4 +366,4 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@ -483,18 +483,6 @@ public class JPQLSerializer extends SerializerBase<JPQLSerializer> {
|
||||
}
|
||||
|
||||
private void visitAnyInPath(Class<?> type, Operator operator, List<? extends Expression<?>> args) {
|
||||
if (!templates.isEnumInPathSupported() && args.get(0) instanceof Constant<?> && Enum.class.isAssignableFrom(args.get(0).getType())) {
|
||||
@SuppressWarnings("unchecked") //guarded by previous check
|
||||
Constant<? extends Enum<?>> expectedConstant = (Constant<? extends Enum<?>>) args.get(0);
|
||||
|
||||
final Enum<?> constant = expectedConstant.getConstant();
|
||||
final Enumerated enumerated = ((Path<?>) args.get(1)).getAnnotatedElement().getAnnotation(Enumerated.class);
|
||||
if (enumerated == null || enumerated.value() == EnumType.ORDINAL) {
|
||||
args = ImmutableList.of(ConstantImpl.create(constant.ordinal()), args.get(1));
|
||||
} else {
|
||||
args = ImmutableList.of(ConstantImpl.create(constant.name()), args.get(1));
|
||||
}
|
||||
}
|
||||
super.visitOperation(type,
|
||||
operator == Ops.IN ? JPQLOps.MEMBER_OF : JPQLOps.NOT_MEMBER_OF,
|
||||
args);
|
||||
|
||||
@ -160,6 +160,7 @@ public class JPQLTemplates extends Templates {
|
||||
return cl.getSimpleName().toLowerCase();
|
||||
}
|
||||
|
||||
@Deprecated // kept for backwards compatibility
|
||||
public boolean isEnumInPathSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user