Class PreboardedExperimentMappingTest
java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseDatabaseTest5
ubic.gemma.persistence.service.expression.experiment.PreboardedExperimentMappingTest
Regression guard for the
PreboardedExperiment discriminator mapping
added in commit 44bf890061.
The compat patch's only job is to let a hotfix-1.32.7 instance MAP an
INVESTIGATION row whose class discriminator column is
'PreboardedExperiment' (written by a phase2 peer against a shared
DB) without throwing WrongClassException or returning null
from polymorphic loads. This test pins the round-trip end-to-end:
- Persist a
PreboardedExperimentvia the session. - Evict from the first-level cache.
- Reload polymorphically via
session.get(Investigation.class, id). - Assert the reloaded instance is typed as
PreboardedExperimentand that the three preboarded-specific fields round-trip.
If the HBM subclass entry is removed, the discriminator value is changed, or the column names drift, this test will fail with a concrete signal (ClassCastException on the assertion, or WrongClassException at load time).
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseDatabaseTest5
BaseDatabaseTest5.BaseDatabaseTestContextConfiguration -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class BaseDatabaseTest5
flushAndClearSession
-
Constructor Details
-
PreboardedExperimentMappingTest
public PreboardedExperimentMappingTest()
-
-
Method Details
-
preboardedRoundTripsThroughHibernate
@Test public void preboardedRoundTripsThroughHibernate()
-