Hello,
i have the following situation and need a hint how to go on. I have a database where some of the tables are dynamically written out of another database. I don´t know the structure of these tables because the sql-command to extract the data from the other database can be dynamically build by the user. He builds the command to extract the data from one or more tables using joins, groupings and so on. The result of these queries are tables in that second database. So all i know is the name of these tables, i don´t know the name of the fields, not the type and not even the number of fields. By the way, there are no relationships between these tables.
Now i want to read the data from that table where i only know the name of. And i want to display it in a tableView. And i also want to determine the name of the fields. I wonder how i can do that with hibernate.
With other languages like Visual Basic i could just sent a sql-command to the database like "select * from <table>". The result was a recordset and i could parse that recordset for the names of the fields. And i could extract the data from the recordset and display it in whatever fasion i prefer. Is there something similar in hibernate?
I have read about dynamic components and about changing the "entity-representation-mode" to dom4j or map. But for all that i still need more information about the structure of my data than the information i have.
Can anybody here tell me a way how to solve my problem and maybe even point me to an example of how to implement it?
Thanks very much for your help.
Christoph
Hibernate version:
3.2.3
Name and version of the database you are using:
SQL-Server 7.0
Oracle 9i
|