Hello, all.
I am trying to model a series of documents (magazines, books, pamphlets) all of which have pages.
The classes Book, Magazine and Pamphlet are defined as children of PageCollection, an abstract class with a one-to-many relationship to a Page class.
I would like each PageCollection subclass to get its Page objects from a different table (Book gets its Pages from the table BOOK_PAGES, Magazine from MAGAZINE_PAGES and so on), to help reduce the size of each table.
I could do this by defining three classes (BookPage, MagazinePage, PamphletPage), each using a different table, but as long as all three PageCollections use identical Pages, I would rather have the annotations or mapping file tell each PageCollection class to use a different table for its Page objects.
Is there a simple way to do this, or am I better off using a different class for each item's Pages?
Thanks for any help,
Ed
|