Is it possible to create views with Schema Export?
If so, how do the mapping files define the views?
The schema I am working with has tables defined and views on those
tables. The mapping files describing the views (see example below)
bascially look similar to those describing a table. Up until now,
I have set up the views and tables using SQL (HDRTrunkAdd is one
of the views) .
Runtime access to the table and view objects works fine. But, I
need to switch to SchemaExport to create the schema. I have used
SchemaExport in the past for schemas that only contain tables.
Searching though the documentation and the forums, I have not been
able to determine a way to use a mapping file to define the
relationship between the views and the tables they represent.
As the mapping files currently are written, using SchemaExport will
create the views as tables with no relationship to the tables
themselves.
Is there a way to use SchemaExport to create views?
Thanks
Al
Hibernate version: 3.0.5
Mapping documents:
Code:
<hibernate-mapping>
<class name="com.datamodel.views.HDRTrunkAddView" table="HDRTRUNKADD">
<id name="uniqueId" type="java.lang.String">
<column name="TRUNKKEY" length="50" not-null="true"/>
<generator class="uuid"/>
</id>
<property name="adapterID" type="java.lang.String">
<column name="AdapterID" length="512" not-null="false"/>
</property>
<property name="dataSourceType" type="java.lang.String">
<column name="DATASOURCETYPE" length="512" not-null="false"/>
</property>
<property name="eid" type="java.lang.Integer">
<column name="EID" length="512" not-null="false"/>
</property>
</class>
</hibernate-mapping>
Name and version of the database you are using: Oracle 10GCode:
Code:
Code:
Code: