-
Bug
-
Resolution: Done
-
Major
-
7.0.0.ER5
-
None
Some tests fails on oracle when entity has no columns except identity one
MapKeyAttributeConverterTest.java#L239
@Entity @Table(name = "map_entity") public static class MapEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "implicitType") private Map<ColorType, MapValue> implicitType = new HashMap<ColorType, MapValue>(); @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "explicitType") private Map<ColorType, MapValue> explicitType = new HashMap<ColorType, MapValue>(); @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "enumDefault") private Map<EnumMapKey, MapValue> enumDefaultType = new HashMap<EnumMapKey, MapValue>(); @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "enumExplicitOrdinal") private Map<EnumMapKey, MapValue> enumExplicitOrdinalType = new HashMap<EnumMapKey, MapValue>(); @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "enumExplicitString") private Map<EnumMapKey, MapValue> enumExplicitStringType = new HashMap<EnumMapKey, MapValue>(); @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "enumExplicit") private Map<EnumMapKey, MapValue> enumExplicitType = new HashMap<EnumMapKey, MapValue>(); @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "enumImplicit") private Map<ImplicitEnumMapKey, MapValue> enumImplicitType = new HashMap<ImplicitEnumMapKey, MapValue>(); @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "enumImplicitOverrideOrdinal") private Map<ImplicitEnumMapKey, MapValue> enumImplicitOverrideOrdinalType = new HashMap<ImplicitEnumMapKey, MapValue>(); @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "enumImplicitOverrideString") private Map<ImplicitEnumMapKey, MapValue> enumImplicitOverrideStringType = new HashMap<ImplicitEnumMapKey, MapValue>(); @OneToMany(mappedBy = "mapEntity", cascade = CascadeType.ALL) @MapKey(name = "enumImplicitOverrided") private Map<ImplicitEnumMapKey, MapValue> enumImplicitOverridedType = new HashMap<ImplicitEnumMapKey, MapValue>(); }
generates INSERT statement
insert into map_entity values ( )
which fails on Oracle12c with ORA-00936: missing expression. The same SQL passes on Sybase. MS SQL Server has different SQL insert into map_entity default values.
At least these tests are affected:
org.hibernate.test.converter.map.MapKeyAttributeConverterTest
- could be changed to use GenerationType.AUTO
- or added column to entity (the @RequiresDialectFeature should be added)
org.hibernate.id.FlushIdGenTest
Workaround is to add some column to entity
@Column private String foo = "bar";
- is incorporated by
-
JBEAP-8554 [GSS](7.0.z) Upgrade Hibernate ORM from 5.0.12 to 5.0.13
- Closed
- cloned from
-
HHH-10689 Loading...