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.