org.hibernate.test.jpa.cascade
Class CascadeTest

java.lang.Object
  extended by org.hibernate.testing.junit4.BaseUnitTestCase
      extended by org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
          extended by org.hibernate.test.jpa.AbstractJPATest
              extended by org.hibernate.test.jpa.cascade.CascadeTest

public class CascadeTest
extends AbstractJPATest

According to the JPA spec, persist()ing an entity should throw an exception when said entity contains a reference to a transient entity through a mapped association where that association is not marked for cascading the persist operation.

This test-case tests that requirement in the various association style scenarios such as many-to-one, one-to-one, many-to-one (property-ref), one-to-one (property-ref). Additionally, it performs each of these tests in both generated and assigned identifier usages...


Nested Class Summary
 
Nested classes/interfaces inherited from class org.hibernate.test.jpa.AbstractJPATest
AbstractJPATest.JPAAutoFlushEventListener, AbstractJPATest.JPAFlushEntityEventListener, AbstractJPATest.JPAFlushEventListener, AbstractJPATest.JPAPersistEventListener, AbstractJPATest.JPAPersistOnFlushEventListener
 
Nested classes/interfaces inherited from class org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
BaseCoreFunctionalTestCase.RollbackWork
 
Field Summary
 
Fields inherited from class org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
DIALECT, NO_CLASSES, NO_MAPPINGS, USE_NEW_METADATA_MAPPINGS, VALIDATE_DATA_CLEANUP
 
Constructor Summary
CascadeTest()
           
 
Method Summary
 String[] getMappings()
           
 void testManyToOneAssignedIds()
           
 void testManyToOneGeneratedIds()
           
 void testManyToOneGeneratedIdsOnSave()
           
 void testManyToOnePropertyRefAssignedIds()
           
 void testManyToOnePropertyRefGeneratedIds()
           
 void testOneToOneAssignedIds()
           
 void testOneToOneGeneratedIds()
           
 void testOneToOnePropertyRefAssignedIds()
           
 void testOneToOnePropertyRefGeneratedIds()
           
 
Methods inherited from class org.hibernate.test.jpa.AbstractJPATest
buildAutoFlushEventListeners, buildFlushEntityEventListeners, buildFlushEventListeners, buildPersisOnFlushEventListeners, buildPersistEventListeners, configure, getCacheConcurrencyStrategy, prepareBootstrapRegistryBuilder
 
Methods inherited from class org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
addMappings, addMappings, afterConfigurationBuilt, afterConfigurationBuilt, afterSessionFactoryBuilt, afterTest, applyCacheSettings, assertAllDataRemoved, beforeTest, buildConfiguration, buildServiceRegistry, cleanupCache, cleanupTest, configuration, constructConfiguration, createSchema, generateBootstrapRegistry, getAnnotatedClasses, getAnnotatedPackages, getBaseForMappings, getDialect, getXmlFiles, onFailure, openSession, openSession, overrideCacheStrategy, prepareBasicRegistryBuilder, prepareTest, readCommittedIsolationMaintained, rebuildSessionFactory, rebuildSessionFactoryOnError, serviceRegistry, sessionFactory
 
Methods inherited from class org.hibernate.testing.junit4.BaseUnitTestCase
releaseTransactions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CascadeTest

public CascadeTest()
Method Detail

getMappings

public String[] getMappings()
Overrides:
getMappings in class AbstractJPATest

testManyToOneGeneratedIdsOnSave

public void testManyToOneGeneratedIdsOnSave()

testManyToOneGeneratedIds

public void testManyToOneGeneratedIds()

testManyToOneAssignedIds

public void testManyToOneAssignedIds()

testOneToOneGeneratedIds

public void testOneToOneGeneratedIds()

testOneToOneAssignedIds

public void testOneToOneAssignedIds()

testManyToOnePropertyRefGeneratedIds

public void testManyToOnePropertyRefGeneratedIds()

testManyToOnePropertyRefAssignedIds

public void testManyToOnePropertyRefAssignedIds()

testOneToOnePropertyRefGeneratedIds

public void testOneToOnePropertyRefGeneratedIds()

testOneToOnePropertyRefAssignedIds

public void testOneToOnePropertyRefAssignedIds()


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.