Hi,
This is a bit interesting and I cant be more thankful If I get a fast response on this as my complete architecture is based on this reply :)
Ok ...
Some Background on this.
I have dynamic tables in my application as in the sense I can add cards in
my network which have in built database. So in other words my database tables would be runtime even though the type would be known at compile time. The name of the database would be something like TABLENAME_PTTSERVERID (where PTTSERVERID would be a run time value.)
So in this case I donot even know the exact name of my database tables though "TABLENAME_" would be common and the type of the table would be the same.
So my question whether I can use Hibernate to work with such tables. I believe Hibernate code generation is based on database table schema, and the name of the Object would be same as the Table name. So if I dont even know the Table name would It be possibe to have some proxy configuration wherein I can write generic code which dips into the table at run time and load on the values into an Object. And then use the Object normally...
Right now I am finding the name of the table at runtime and generating SQL queries for everything for that table. I need to change this.
I just want to know whether It is possible to do it using Hibernate and if YES then HOW?????????/
Please do get back to me......Thanks a TON in Advance,
Amit
|