Skip to content

Commit c2327c8

Browse files
David EllingsworthDavid Ellingsworth
David Ellingsworth
authored and
David Ellingsworth
committed
nhibernateGH-3530: Rearrange mappings to and remove the schema-action attributes.
The SchemaExporter only creates the schema for a table based on the mapping for the first class it is provided. Subsequent mappings will not affect the schema generated.
1 parent cc1da41 commit c2327c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/NHibernate.Test/NHSpecificTest/GH3530/Mappings.hbm.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernate.Test"
33
namespace="NHibernate.Test.NHSpecificTest.GH3530">
4-
<!-- The schema exporter should ignore this version but we should be able to map it to the version created below. -->
5-
<class name="LocaleEntity" schema-action="validate" table="LocaleEntity">
4+
<!-- The schema exporter only exports the schema of the first class for a table. -->
5+
<class name="SchemaLocaleEntity" table="LocaleEntity">
66
<id name="Id" generator="guid.comb" />
77
<property name="IntegerValue" column="IntegerValue"/>
88
<property name="DateTimeValue" column="DateTimeValue"/>
99
<property name="DoubleValue" column="DoubleValue"/>
1010
<property name="DecimalValue" column="DecimalValue"/>
1111
</class>
12-
<!-- The schema exporter should export this version of the entity and generate text columns for all types. -->
13-
<class name="SchemaLocaleEntity" table="LocaleEntity" schema-action="export">
12+
<!-- The schema exporter will ignore this because the above class already creates the table. -->
13+
<class name="LocaleEntity" table="LocaleEntity">
1414
<id name="Id" generator="guid.comb" />
1515
<property name="IntegerValue" column="IntegerValue"/>
1616
<property name="DateTimeValue" column="DateTimeValue"/>

0 commit comments

Comments
 (0)