Hi!
Our corporate database contains tables with great number of columns, in many cases more than 255. As far as i know, the full constructor of the java class that is used for mapping a table in Hibernate should accept as many parameters as the number of the table columns (at least at the simplest case, with no composite keys etc.). In our case, writing a class constructor with more than 255 parameters would yield a compilation error, due to the restrictions in java about maximum number of parameters in a method.
On the other hand, if i want to use the session.load or session.get methods for retrieving a whole row from these tables, i must define the full constructor of the mapping class.(Please correct me if i am wrong.)
Is there any way to bypass these restrictions? I have thought of using report queries, but it doesn't seem as a good idea to add all the mapping class fields in the select statement.
Thanks in advance.
|