Hi all,
can I add a 'fake' primary key for a field that belongs to a view?
My view has a column that could be used as primary key but
when i tell hbm2java something like this in the reveng.xml:
Code:
<table name="MY_VIEW_XY">
<primary-key>
<key-column name="XP_PK"/>
</primary-key>
</table>
hibernate tool says:
Quote:
[hibernatetool] CONSOLE> 13.10.2009 00:04:56 WARN main org.hibernate.cfg.reveng.JDBCReader - Rev.eng
. strategy did not report any primary key columns for MY_VIEW_XY.
Or maybe someone has a better idea? The reason I want to define the
primary key is to avoid having the view rows generated as @Embeddable
MY_VIEW_XY_Id classes. Can I tell hbm2java that it's only a view that
I don't want to update anyway?