Hi,
I understand Hibernate Shards lets me distribute data between databases based upon access strategies I may specify (or use defaults). I would like to distribute data between tables instead and can't find a proper solution that works for me.
I am about to write an application that does a lot of accounting. Usually I have lots of objects, and each of them used to have its own account table in a previous version that didn't use Hibernate. For each object, I had a table "ACCOUNTnnnn", where "nnnn" ist the object's number. Accounting tables are being created dynamically whenever a new object has been created. This is useful, because each of the tables can contain a mass of data, and I wouldn't like to keep a few million records within one single table.
I would like the same behavior in the new version, where I use Hibernate's latest version and Annotations. As far as I have understood Shards, this will not solve my problem, as I wouldn't like to create several hundred databases.
Is there any hidden annotation based solution I haven't come across yet? Or did I misunderstand Hibernate Shards, as it can also distribute data between tables? Can anybody help me, please?
Thanks a lot and regards,
Heiko
|