Package models.zoo

Examples of models.zoo.Zoo


    }

    @Ignore("wait for full fix")
    @Test
    public void testOrphanRemovalDepDeletion() {
  final Zoo zoo = new Zoo().save();
  zoo.lion = new Animal();
  zoo.save();
  zoo.lion = null; // lion escaped from zoo
  zoo.save(); // this line causes a violation exception: seems to be due
        // to a Hibernate bug (see
        // http://stackoverflow.com/questions/20280271/hibernate-jpa-onetoone-orphan-removal-still-not-working-as-of-4-2-7-4-3-0-cr1)
  assertEquals("There should be no animal left", 0, Animal.count());
  assertEquals("There should not be any meals left", 0, Meal.count());
    }
View Full Code Here

TOP

Related Classes of models.zoo.Zoo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.