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>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to