This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
You can map two tables as one in Hibernate, but it is frowned upon. Which is probably why there is no way to do it in middlegen. So your only option is to hand craft the mapping file and POJO from the four files middlegen will generate. [ June 09, 2004: Message edited by: Paul Sturrock ]
I feel middlegen generates only one mapping file for each table. And the POJO code is generated by hibernate's hbm2java. How can we manually create one mapping file for two tables together to generate one class file?
That is a view on one table - which you can update. However in SQL there are a whole bunch of restrictions on views if you want to be able to update the data. For example you cannot update a normal view which includes: GROUP functions, a GROUP BY clause, DISTINCT, subquery, DISTINCT, joins accross multiple tables etc.
In Oracle, you can write an updatable materialized view or a writable materialized view if you have configured Oracle to use advanced replication.