I get the following error when attempting to parse this schema (produced using Mapping.Attributes):Cannot extend unmapped class: nhibernate2test.BLL.Tank
Here is the stack trace:
at NHibernate.Cfg.HbmBinder.GetSuperclass(Mappings model, XmlNode subnode) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\HbmBinder.cs:line 1689
at NHibernate.Cfg.HbmBinder.BindRoot(XmlDocument doc, Mappings model) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\HbmBinder.cs:line 1600
at NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 375
at NHibernate.Cfg.Configuration.AddXmlReader(XmlTextReader hbmReader) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1556
at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 421
at nhibernate2test.Form1.Form1_Load(Object sender, EventArgs e) in C:\sourcecode\nhibernate2test\nhibernate2test\Form1.vb:line 21
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at nhibernate2test.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()"
Please notice that Tank is mapped in bold.
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="nhibernate2test.BLL.Equipment, nhibernate2test.BLL" lazy="false" table="bv_equipment_with_discriminator">
<id column="equipment_id" type="Guid">
<generator class="guid" />
</id>
<discriminator column="discriminator" type="String" />
<property name="Name" type="String" column="equipment_name" />
<property name="Description" type="String" column="equipment_description" />
<property name="BaanSupplierID" type="String" column="baan_supplier_id" />
<property name="BaanItemID" type="String" column="baan_item_id" />
<property name="BaanPackageCode" column="baan_package_code" />
<property name="BaanNumber" type="String" column="baan_number" />
<property name="BaanItemGroup" column="baan_item_group" />
<property name="ManufacturerID" column="manufacturer_id" />
<property name="VendorID" column="vendor_id" />
<property name="Actual" column="actual" />
<property name="ShippingWeight" column="shipping_weight" />
<property name="ShippingWeightUnits" column="shiipping_weight_units_id" />
<property name="RectangularShape" column="rectangular_shape" />
<property name="Diameter" column="diameter" />
<property name="Length" column="length" />
<property name="Width" column="width" />
<property name="Height" column="height" />
<property name="CustomItem" column="custom_item" />
<property name="ProjectNumber" type="String" column="project_number" />
<property name="CreatedBy" column="created_by" />
<property name="CreatedDate" column="created_Date" />
<property name="ModifiedBy" column="modified_by" />
<property name="ModifiedDate" column="modified_Date" />
<property name="RegionSbuID" column="region_sbu_id" />
<property name="Cost" column="cost" />
<property name="CurrencyID" type="String" column="currency_id" />
<property name="ValidDate" column="valid_date" />
<property name="ExpiryDate" column="expiry_date" />
<property name="QuoteReference" type="String" column="quote_reference" />
</class>
<subclass name="nhibernate2test.BLL.AerobicTank, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Tank, nhibernate2test.BLL" discriminator-value="Aerobic" />
<subclass name="nhibernate2test.BLL.AirDiffuser, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Equipment, nhibernate2test.BLL" discriminator-value="Air Diffusers">
<property name="ActualFlow" column="flow_actual" />
<property name="FlowUpperLimit" column="flow_upper_limit" />
<property name="FlowLowerLimit" column="flow_lower_limit" />
<property name="FlowUnits" column="flow_units_id" />
<property name="DesignDepth" column="air_diffuser_design_depth" />
<property name="Footprint" column="air_diffuser_footprint" />
<property name="SOTR" column="air_diffuser_sotr" />
<property name="Flow" column="air_diffuser_flow" />
</subclass>
<subclass name="nhibernate2test.BLL.AirDrier, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Equipment, nhibernate2test.BLL" discriminator-value="Air Driers">
<property name="Material" column="air_drier_material_id" />
<property name="ActualFlow" column="flow_actual" />
<property name="FlowUpperLimit" column="flow_upper_limit" />
<property name="FlowLowerLimit" column="flow_lower_limit" />
<property name="FlowUnits" column="flow_units_id" />
<property name="MinimumOutputDewPoint" column="air_drier_min_output_dewpoint" />
<property name="UpperOperatingTemperature" column="air_drier_upper_operating_temp" />
<property name="LowerOperatingTemperature" column="air_drier_lower_operating_temp" />
<property name="Stage" column="air_drier_stages_id" />
</subclass>
<subclass name="nhibernate2test.BLL.AnoxicTank, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Tank, nhibernate2test.BLL" discriminator-value="Anoxic" />
<subclass name="nhibernate2test.BLL.Blower, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Equipment, nhibernate2test.BLL" discriminator-value="Blowers">
<property name="ConstructionMaterial" column="blower_construction_id" />
<property name="SPL" column="blower_spl" />
<property name="SoundEnclosureIncluded" column="blower_sound_enclosure_included" />
<property name="SoundEnclosureConstructionMaterial" column="blower_sound_enclosure_material_id" />
</subclass>
<subclass name="nhibernate2test.BLL.BreakTank, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Tank, nhibernate2test.BLL" discriminator-value="Break" />
<subclass name="nhibernate2test.BLL.ChemicalBackpulseTank, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Tank, nhibernate2test.BLL" discriminator-value="Chemical/Backpulse" />
<subclass name="nhibernate2test.BLL.CIPTank, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Tank, nhibernate2test.BLL" discriminator-value="CIP" />
<subclass name="nhibernate2test.BLL.CoarseAirDiffuser, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.AirDiffuser, nhibernate2test.BLL" discriminator-value="Coarse Air Diffuser">
<property name="ConstructionMaterial" column="coarse_air_diffuser_construction_id" />
</subclass>
<subclass name="nhibernate2test.BLL.Compressor, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Equipment, nhibernate2test.BLL" discriminator-value="Compressors">
<property name="ConstructionMaterial" column="compressor_construction_id" />
<property name="SPL" column="compressor_spl" />
<property name="SoundEnclosureIncluded" column="compressor_sound_enclosure_included" />
<property name="OilLubricated" column="compressor_oil_lubricated" />
<property name="Mounting" column="compressor_mounting_id" />
</subclass>
<subclass name="nhibernate2test.BLL.DesiccantAdsorptionAirDrier, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.AirDrier, nhibernate2test.BLL" discriminator-value="Desiccant adsorption" />
<subclass name="nhibernate2test.BLL.DipTank, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Tank, nhibernate2test.BLL" discriminator-value="Dip" />
<subclass name="nhibernate2test.BLL.FineBubbleAirDiffuser, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.AirDiffuser, nhibernate2test.BLL" discriminator-value="Fine Bubble Diffuser">
<property name="DiscDiameter" column="fine_bubble_disc_diameter" />
<property name="DiscMaterial" column="fine_bubble_disc_material_id" />
<property name="BasePlateMaterial" column="fine_bubble_baseplate_material_id" />
</subclass>
<subclass name="nhibernate2test.BLL.MembraneTank, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Tank, nhibernate2test.BLL" discriminator-value="Membrane">
<property name="BeamFrameIncluded" column="membrane_tank_beam_frame_included" />
<property name="BeamConstructionMaterial" column="membrane_tank_beam_construction_id" />
<property name="FloorStandingFrameIncluded" column="membrane_tank_floor_standing_frame_included" />
<property name="FloorStandingConstructionMaterial" column="membrane_tank_floor_standing_construction_id" />
<property name="WalkwayCoveringIncluded" column="membrane_tank_walkway_covering_included" />
<property name="WalkwayCoveringConstructionMaterial" column="membrane_tank_walkway_covering_construction_id" />
<property name="HandrailIncluded" column="membrane_tank_handrail_included" />
<property name="HandrailConstructionMaterial" column="membrane_tank_handrail_construction_id" />
</subclass>
<subclass name="nhibernate2test.BLL.MultistageCentrifugalBlower, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Blower, nhibernate2test.BLL" discriminator-value="Multistage Centrifugal" />
<subclass name="nhibernate2test.BLL.OtherTank, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Tank, nhibernate2test.BLL" discriminator-value="Other" />
<subclass name="nhibernate2test.BLL.PistonCompressor, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Compressor, nhibernate2test.BLL" discriminator-value="Piston" />
<subclass name="nhibernate2test.BLL.PositiveDisplacementBlower, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Blower, nhibernate2test.BLL" discriminator-value="Positive Displacement" />
<subclass name="nhibernate2test.BLL.RefrigerationAirDrier, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.AirDrier, nhibernate2test.BLL" discriminator-value="Refrigeration" />
<subclass name="nhibernate2test.BLL.RegenerativeBlower, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Blower, nhibernate2test.BLL" discriminator-value="Regenerative" />
<subclass name="nhibernate2test.BLL.RotaryScrewCompressor, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Compressor, nhibernate2test.BLL" discriminator-value="Rotary Screw" />
<subclass name="nhibernate2test.BLL.SingleStageCentrifugalBlower, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Blower, nhibernate2test.BLL" discriminator-value="Single Stage Centrifugal" />
<subclass name="nhibernate2test.BLL.Tank, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Equipment, nhibernate2test.BLL" discriminator-value="Tanks">
<property name="ConstructionMaterial" column="tank_construction_id" />
<property name="SlopeID" column="tank_slope_id" />
<property name="TopClosed" column="tank_top_closed" />
<property name="SoundEnclosureConstructionMaterial" column="blower_sound_enclosure_material_id" />
<property name="ExteriorPaint" column="tank_exterior_paint_id" />
<property name="InternalCoating" column="tank_internal_coating_id" />
</subclass>Code:
<subclass name="nhibernate2test.BLL.Valve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Equipment, nhibernate2test.BLL" discriminator-value="Valves">
<property name="BodyConstructionMaterial" column="valve_body_construction_id" />
<property name="SeatConstructionMaterial" column="valve_seat_construction_id" />
<property name="SealConstructionMaterial" column="valve_seal_construction_id" />
</subclass>
<subclass name="nhibernate2test.BLL.ButterflyValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Butterfly" />
<subclass name="nhibernate2test.BLL.BallValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Ball" />
<subclass name="nhibernate2test.BLL.CheckValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Check" />
<subclass name="nhibernate2test.BLL.KnifeGateValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Knife Gate" />
<subclass name="nhibernate2test.BLL.DiaphragmValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Diaphragm" />
<subclass name="nhibernate2test.BLL.GlobeValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Globe" />
<subclass name="nhibernate2test.BLL.NeedleValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Needle" />
<subclass name="nhibernate2test.BLL.SluiceGateValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Sluice Gate" />
<subclass name="nhibernate2test.BLL.MudValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Mud Valve" />
<subclass name="nhibernate2test.BLL.BallCheckValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Ball Check" />
<subclass name="nhibernate2test.BLL.AngleSeatValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Angle Seat" />
<subclass name="nhibernate2test.BLL.OtherValve, nhibernate2test.BLL" lazy="false" extends="nhibernate2test.BLL.Valve, nhibernate2test.BLL" discriminator-value="Other" />
</hibernate-mapping>