-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem mapping component
PostPosted: Mon Mar 17, 2008 11:23 am 
Newbie

Joined: Mon Jan 21, 2008 3:25 pm
Posts: 6
My apologies if this is a duplicate, the original seems to have vanished.

I can't get a component to map. The following XML compiles if the component and /component lines are commented out (as shown), but does not compile if they are present (as desired). I am clearly doing something stupid, but of course cannot tell what. Any hints?

Thanks,

Brian Hetrick

Code:
<?xml version="1.0" encoding="utf-8" ?>

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">

  <class lazy="false" name="MyProject.Draw, MyProject"
         optimistic-lock="version" table="Draw">

    <id access="field" column="ID" name="m_id" type="int" unsaved-value="0">
      <generator class="identity" />
    </id>
    <version access="field" column="Version" name="m_version" type="int" unsaved-value="0" />

    <many-to-one access="MyProject.DAO.NoSetterCamelCaseMUnderscore, MyProject"
                 class="MyProject.CirculationSet, MyProject" column="CirculationSet"
                 name="CirculationSet" not-null="true" />
    <property column="Created" name="Created" type="DateTime" />
    <property column="PaidCirculation" name="PaidCirculation" type="int" />
    <property column="SampleCirculation" name="SampleCirculation" type="int" />
    <property column="ServiceCirculation" name="ServiceCirculation" type="int" />
<!--
    <component name="TargetAtom" class="MyProject.TargetAtom, MyProject" >
-->
      <many-to-one access="MyProject.DAO.NoSetterCamelCaseMUnderscore, MyProject"
                   cascade="all" class="MyProject.BaseZone, MyProject"
                   column="BaseZone" name="BaseZone" not-found="exception" />
      <bag access="MyProject.DAO.NoSetterCamelCaseMUnderscore, MyProject"
           cascade="all"
           collection-type="MyProject.Collections.PPSSetFactory`1[[MyProject.TargetAtom]], MyProject"
           inverse="false" lazy="true" name="TargetAtom" table="Relation_Draw_TargetAtom">
        <key column="Draw" />
        <element column="TargetAtom" type="MyProject.TargetAtom, MyProject"
                 not-null="true" />
      </bag>
<!--
    </component>
-->
  </class>

</hibernate-mapping>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.