Class OneManyUnidirectionalTest


  • public class OneManyUnidirectionalTest
    extends DemoBase
    • Constructor Detail

      • OneManyUnidirectionalTest

        public OneManyUnidirectionalTest()
    • Method Detail

      • cleanup

        protected void cleanup()
                        throws Exception
        This method will cleanup the database of our OneToMany entities. We start with the owning entities, since they own the foreign keys or the link/join tables with the foreign keys. Once the associations have been deleted, all inverse and oblivious entities can be safely removed.
        Throws:
        Exception
      • testOneToManyOwningParent

        public void testOneToManyOwningParent()
        This method tests the case where the parent owns the relationship. Since children in a one-to-many relationship are required by JPA to own the relationship, we can only test this with children that know nothing of the parent. In this case, there is only an owning side.