Last active
March 29, 2016 04:53
-
-
Save cosbor11/4eece591d27bb321f7d2 to your computer and use it in GitHub Desktop.
Fetch the season that you recently created
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Fetch a new copy of the entity so that we can illustrate how eager relationships are fetched | |
| Series theSopranosCopy = (Series)manager.findById(Series.class, theSopranos.seriesId); | |
| // Assert seasons which is an eagerly loaded | |
| assertNotNull("Seasons should be populated because it is eagerly fetched", theSopranosCopy.seasons); | |
| assertTrue("Seasons should be fully populated as an ArrayList", (theSopranosCopy.seasons instanceof ArrayList)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment