I am trying to map my objects to Views (Read only objects). I set
schema-action to none and Validate to avoid creating any new tables.

My issue here is Schema export is trying to create Join table
Station__rooms for the list object which i want to map to an existing
View and not to create a table.

What do i need to specify on the collection mappings for schema export
not to generate those tables.

Here is how mapping looks like
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="ObjectModel"
                   namespace="ServiceLayer" auto-import="false">

    <class name="com.temp.objects.Station" table="Stations_V"
lazy="true" mutable="false"
            dynamic-insert="false" dynamic-update="false" schema-
action="none,validate">
         <composite-id>
             <key-property name="Id" column="Id" type="string"/>
         </composite-id>
             <property name="Name" column="Name" type="string" />


         <list name="Rooms" table="Station__rooms" cascade="none"
inverse="false" mutable="false">
             <key>
                  <column name="Id" />
             </key>
             <list-index column="idx" />
             <many-to-many class="com.temp.objects.Room" column="Room" />
         </list>
    </class>
</hibernate-mapping>


Reply via email to