[hibernate-dev] metamodel work

Steve Ebersole steve at hibernate.org
Tue May 22 17:41:21 EDT 2012


This transition from "Configuration metadata" to "new Metadata" is just 
that.. a transition.  I'd really rather not spend a lot of time 
developing testing extensions for dealing with the transitory nature of 
this.

This "hibernate.test.new_metadata_mappings" setting is only pertinent 
for tests that extend from 
org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.  In fact, I'd 
really say that it is only pertinent for tests of 
functionality/features that have not yet been implemented in metamodel 
branch.  If a test is specifically testing new metamodel branch code, I 
am not sure why it is dependent on 
"hibernate.test.new_metadata_mappings" at all.

> I would like to be able to run these tests (that I move to src/test) using both the old and new types of metamedata so I can:
> 1) ensure that the test passes for both types of metadata;
> 2) detect at a later date if some change was made that broke the test for either type of metadata;
> 3) easily compare the SQL that gets generated from both types of metadata to see if there are any differences; if there are differences, at this point (at least), they'd probably be due to something not yet implemented in the new metamodel.

Why are you writing new tests and wanting to have it run against the 
the old Configuration setup?  I think this is the central part I am 
missing.


> I'd like to be able to run all the "test" tests (i.e., excluding the "matrix" tests) using hibernate.test.new_metadata_mappings set to true. Currently, there are 29 failures. It would be nice to be able to indicate (e.g., using an annotation) that a test is expected to fail using the new metamodel.

Well again, to me this "hibernate.test.new_metadata_mappings" is an 
explicitly transitory thing.  Yep there are failures.  We know there 
are failures.  We expect that until we finish implementing features in 
the new metamodel code there will continue to be failures.  But this is 
exactly why "hibernate.test.new_metadata_mappings" is false by default.


--
steve at hibernate.org
http://hibernate.org


More information about the hibernate-dev mailing list