Skip to content
This repository has been archived by the owner on Oct 4, 2018. It is now read-only.

Failing metamodel tests

Strong Liu edited this page Jul 22, 2013 · 144 revisions

Indexed Collection

Map key that is an entity is not supported

  • org/hibernate/test/hql/ClassicTranslatorTest (hbm: index-many-to-many)
  • org/hibernate/test/hql/CriteriaClassicAggregationReturnTest (hbm: index-many-to-many)
  • org/hibernate/test/hql/HQLTest (hbm: index-many-to-many)
  • org/hibernate/test/legacy/FooBarTest (hbm: index-many-to-many)
  • org/hibernate/test/legacy/FumTest (hbm: index-many-to-many)
  • org/hibernate/test/legacy/ParentChildTest (hbm: index-many-to-many)
  • org/hibernate/test/ternary/TernaryTest (hbm: map-key-many-to-many)
  • org.hibernate.test.annotations.indexcoll.MapKeyTest (annotations: @MapKey)
  • org/hibernate/test/annotations/genericsinheritance/GenericsInheritanceTest (@MapKey)
  • org.hibernate.test.annotations.indexcoll.IndexedCollectionTest (annotations: @MapKeyJoinColumn/@MapKeyJoinColumns)
  • org.hibernate.test.collection.map.hhh7557.EntityMapTest (annotations: @MapKeyJoinColumn/@MapKeyJoinColumns)

@MapKeyClass not supported (annotations)

  • org/hibernate/test/annotations/xml/ejb3/Ejb3XmlTest.java
  • org.hibernate.test.annotations.target.TargetTest

Map key that is a formula is not supported

  • org/hibernate/test/map/MapIndexFormulaTest (hbm: @MapKey)

"idbag" is not supported yet:

  • org/hibernate/test/idbag/IdBagTest.java
  • org/hibernate/test/collection/idbag/PersistentIdBagTest.java
  • org.hibernate.test.annotations.collectionelement.indexedCollection.IndexedCollectionOfElementsTest
  • org/hibernate/test/annotations/identifiercollection/IdentifierCollectionTest.java

Embeddables

  • org.hibernate.test.annotations.embedded.EmbeddedTest.testDefaultCollectionTable

  • org.hibernate.test.annotations.embedded.EmbeddedTest.testDottedProperty

  • org.hibernate.test.annotations.embedded.EmbeddedTest.testEmbeddedSuperclass

    @Embeddable class has a super class with @MappedSuperclass

  • org.hibernate.test.annotations.embedded.NestedEmbeddableAttributeOverrideTest ( HHH-8021 )

Attribute override bugs

@AssociationOverride is not used

  • org.hibernate.test.annotations.override.AssociationOverrideSchemaTest
  • org.hibernate.test.annotations.override.AssociationOverrideTest

@AttributeOverrides_ on @ElementCollection is not working when the element type is embeddable

  • org/hibernate/test/annotations/override/AttributeOverrideTest.java
  • org/hibernate/test/annotations/collectionelement/CollectionElementTest.testCompositeElement

referenced join columns do not correspond with columns bound for an attribute binding

  • org.hibernate.test.annotations.referencedcolumnname.ReferencedColumnNameTest
  • org.hibernate.test.annotations.manytomany.compositepk.ManyToManyCompositePkTest
  • org.hibernate.test.annotations.manytoone.ManyToOneTest
  • org.hibernate.test.annotations.cid.CompositeIdTest
  • org.hibernate.test.annotations.manytoone.referencedcolumnname.ManyToOneReferencedColumnNameTest
  • org/hibernate/test/annotations/onetomany/OneToManyTest.java
  • org.hibernate.test.annotations.onetomany.OrderByTest
  • org/hibernate/test/annotations/manytomany/joinedsubclass/ManyToManyJoinedSubclassTest.java

IDs

virtual id attribute

  • org.hibernate.test.legacy.MasterDetailTest

    see HHH-7858

mappedBy one-to-one with foreign generator

  • org/hibernate/test/annotations/onetoone/OptionalOneToOneMappedByTest.testBidirForeignIdGenerator

ID with many-to-one supported

  • org/hibernate/test/annotations/idclassgeneratedvalue/IdClassGeneratedValueTest (annotations)
  • org/hibernate/test/annotations/idmanytoone/alphabetical/AlphabeticalIdManyToOneTest (annotations)
  • org/hibernate/test/annotations/id/sequences/HibernateSequenceTest (annotations)

Derived IDs are not supported (related to ID with many-to-one not supported):

  • org.hibernate.test.annotations.cid.CompositeIdTest
  • org.hibernate.test.legacy.ComponentNotNullTest (HBM "nested-composite-element" is not supported)
  • org/hibernate/test/hql/EJBQLTest
  • org/hibernate/test/annotations/query/QueryAndSQLTest
  • org/hibernate/test/typedmanytoone/TypedManyToOneTest.java
  • org.hibernate.test.annotations.derivedidentities.e1.a.DerivedIdentitySimpleParentIdClassDepTest
  • org/hibernate/test/annotations/derivedidentities/e1/b2/IdClassGeneratedValueManyToOneTest.java
  • org/hibernate/test/annotations/derivedidentities/e1/b/DerivedIdentitySimpleParentEmbeddedIdDepTest.java
  • org/hibernate/test/annotations/derivedidentities/e1/b/specjmapid/IdMapManyToOneSpecjTest.java
  • org/hibernate/test/annotations/derivedidentities/e1/b/specjmapid/lazy/CompositeKeyDeleteTest.java
  • org/hibernate/test/annotations/derivedidentities/e1/c/DerivedIdentitySimpleParentEmbeddedDepTest.java
  • org/hibernate/test/annotations/derivedidentities/e2/a/DerivedIdentityIdClassParentIdClassDepTest.java
  • org/hibernate/test/annotations/derivedidentities/e2/b/DerivedIdentityIdClassParentEmbeddedIdDepTest.java
  • org/hibernate/test/annotations/derivedidentities/e3/a/DerivedIdentityEmbeddedIdParentIdClassTest.java
  • org/hibernate/test/annotations/derivedidentities/e3/b/DerivedIdentityEmbeddedIdParentEmbeddedIdDepTest.java
  • org/hibernate/test/annotations/derivedidentities/e4/b/DerivedIdentitySimpleParentSimpleDepMapsIdTest.java
  • org/hibernate/test/annotations/derivedidentities/e5/a/DerivedIdentityIdClassParentSameIdTypeIdClassDepTest.java
  • org/hibernate/test/annotations/derivedidentities/e5/b/DerivedIdentityIdClassParentSameIdTypeEmbeddedIdDepTest.java
  • org/hibernate/test/annotations/derivedidentities/e5/c/ForeignGeneratorViaMapsIdTest.java
  • org/hibernate/test/annotations/derivedidentities/e6/a/DerivedIdentityEmbeddedIdParentSameIdTypeIdClassDepTest.java
  • org/hibernate/test/annotations/derivedidentities/e6/b/DerivedIdentityEmbeddedIdParentSameIdTypeEmbeddedIdDepTest.java

HBM "properties" is not supported yet

  • org/hibernate/test/abstractembeddedcomponents/propertyref/AbstractComponentPropertyRefTest
  • org/hibernate/test/bidi/AuctionTest
  • org/hibernate/test/formulajoin/FormulaJoinTest
  • org/hibernate/test/cuk/CompositePropertyRefTest
  • org/hibernate/test/propertyref/inheritence/joined/JoinedSubclassPropertyRefTest

NamingStrategy

  • org/hibernate/test/hql/BulkManipulationTest
  • org/hibernate/test/hql/WithClauseTest

Any Type:

  • org/hibernate/test/hql/ASTParserLoadingTest (uses many-to-any)
  • org/hibernate/test/annotations/any/AnyTest.java

Dynamic Map:

  • org/hibernate/test/entitymode/map/basic/DynamicClassTest.java

    caused by trying to resolve attribute's java type from a non-pojo entity mode, we need to rewrite the whole HibernateTypeHelper, I think.

  • org/hibernate/test/entitymode/map/subclass/SubclassDynamicMapTest.java

  • org/hibernate/test/onetoone/nopojo/DynamicMapOneToOneTest.java

  • org/hibernate/test/legacy/MapTest.java

A mapped superclass cannot extend an entity (should this be supported???):

  • org/hibernate/test/annotations/entitynonentity/EntityNonEntityTest.java
  • org/hibernate/test/annotations/mappedsuperclass/intermediate/IntermediateMappedSuperclassTest.java

NotFound.IGNORE (HHH-7916)

  • org/hibernate/test/annotations/notfound/NotFoundTest.java
  • org.hibernate.test.unconstrained.UnconstrainedTest
  • org.hibernate.test.collection.original.CollectionTest

Plural Attribute Laziness

see org.hibernate.metamodel.internal.source.hbm.AbstractPluralAttributeSourceImpl#getFetchTiming and org.hibernate.cfg.HbmBinder#initOuterJoinFetchSetting

and the joined sub-class laziness

  • org/hibernate/test/collection/original/CollectionTest.testExtraLazy

Custom Collection Type is not working

The problem is in this method, at least kind of org.hibernate.metamodel.internal.HibernateTypeHelper#bindHibernateTypeDescriptor,

In this method, if the passed in resolvedType is not null, then we assume it is the type and just ignore the explicitTypeName.

for Ann, the @CollectionType is not bindded at all.

  • org/hibernate/test/collection/custom/basic/UserCollectionTypeAnnotationsVariantTest.java

  • org/hibernate/test/collection/custom/basic/UserCollectionTypeHbmVariantTest.java

  • org/hibernate/test/collection/custom/parameterized/ParameterizedUserCollectionTypeAnnotationsVariantTest.java

  • org/hibernate/test/collection/custom/parameterized/ParameterizedUserCollectionTypeHbmVariantTest.java

  • org/hibernate/test/sql/hand/query/NativeSQLQueriesTest.java

    this is actually a custom user type issue, it uses a custom UserType as a composite attribute's type, where runs into org.hibernate.metamodel.internal.HibernateTypeHelper#bindJdbcDataType and this method checks only if the type is an instance of CompositeType, doesn't check CompositeUserType nor UserType at all.

XML PROCESSING

  • org/hibernate/test/legacy/CustomSQLTest.java (HHH-7925)

TBD

  • org/hibernate/test/annotations/uniqueconstraint/UniqueConstraintValidationTest.java : AssertionError

  • org/hibernate/test/propertyref/DoesNotWorkWithHbmTest.java : AssertionError: expected:<2> but was:<3>

  • org/hibernate/test/annotations/xml/ejb3/NonExistentOrmVersionTest.java : AssertionError: Expecting failure due to unsupported xsd version

  • org/hibernate/test/annotations/manytoonewithformula/ManyToOneWithFormulaTest.java

  • org/hibernate/loader/EncapsulatedCompositeAttributeResultSetProcessorTest.java : AssertionError: expected:<2> but was:<1>

  • org/hibernate/loader/EntityWithNonLazyOneToManyListResultSetProcessorTest.java : AssertionError: expected:<2> but was:<1>

  • org/hibernate/loader/EntityWithNonLazyOneToManySetResultSetProcessorTest.java : AssertionError: expected:<2> but was:<1>

  • org/hibernate/loader/EntityWithNonLazyCollectionResultSetProcessorTest.java : NullPointerException

  • org/hibernate/loader/EncapsulatedCompositeIdResultSetProcessorTest.java : java.lang.NumberFormatException: For input string: "ace-of-spades"

  • org.hibernate.test.annotations.entity.BasicHibernateAnnotationsTest.testVersioning

  • org.hibernate.test.annotations.entity.BasicHibernateAnnotationsTest.testInheritFiltersFromMappedSuperclass

  • org/hibernate/test/annotations/xml/ejb3/OrmVersion1SupportedTest.java

  • org/hibernate/test/legacy/MapTest.java

  • org/hibernate/test/manytomanyassociationclass/surrogateid/generated/ManyToManyAssociationClassGeneratedIdTest.java

  • org.hibernate.test.annotations.strategy.StrategyTest

    same as below

  • org/hibernate/test/propertyref/DoesNotWorkWithHbmTest.java

    The entity used in this test has the follow unique constraint @Table(uniqueConstraints = {@UniqueConstraint(columnNames = {"start.country", "start.city"})}) , it uses a attribute path ( aka, logical column name in the old metamodel ) to define the constraint column name, it used to work fine, we have org.hibernate.cfg.Configuration.MappingsImpl.TableColumnNameBinding that maintaining the logical column name and physical column name mapping.

    But in the new metamodel, we don't have such concept, so when creating unique constraint, it can't find the column and then have no choice but creating new one, which caused duplicated columns.

    It seems incorrect to use attribute path here, according to the JPA SPEC, but hard to tell if we should "correct" this, since we don't know if it will cause imcompatibility issue, I'd like to get this fixed and make migration easier.

new failing tests ( these were only test w/ configuration, so they didn't fail )

  • org.hibernate.test.annotations.access.jpa.AccessMappingTest
  • org.hibernate.test.annotations.namingstrategy.NamingStrategyTest#testWithEJB3NamingStrategy
  • org.hibernate.test.annotations.onetoone.OneToOneErrorTest
  • org.hibernate.test.annotations.access.xml.XmlAccessTest
  • org.hibernate.test.type.AttributeConverterTest
  • org.hibernate.test.cfg.cache.CacheConfigurationTest
  • org.hibernate.test.schemavalidation.SynonymValidationTest
  • org.hibernate.test.naturalid.inheritance.spread.SpreadNaturalIdTest
  • org.hibernate.test.nationalized.SimpleNationalizedTest @Nationalized is not processed