Joined: Mon Dec 05, 2005 2:19 pm Posts: 1
|
Can the table for which an object is stored be changed dynamically at run time?
I'm adding persistence to an existing project and I'm concerned about the following: I have a 'project' object which contains a collection (from a few dozen to a few hundred) of an 'item' object. When I generate the mapping file for the 'item' object it specifies a table name. If all 'item' objects (for all 'project' objects) are stored to the same table, then over time -years- that table could grow huge and selects would grow slower. Since my application can only have one 'project' open at a time is there some way to override the table in the item.hbm.xml file so that all 'item' objects go to a table with a 'project' specific name (like ITEMS_IN_PROJECT__PROJECTNAME)?
thanks much
|
|