-->
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: Zeros Entered in Many-to-Many Join Table
PostPosted: Tue Sep 04, 2007 12:05 pm 
Newbie

Joined: Thu May 05, 2005 8:08 am
Posts: 4
I have searched around the forums and noticed people facing problems with relevant foreign keys not being entered in Many-to-Many Join Tables.

However, in my case zeros are being added into the Join Table. Data is being populated accurately into the two tables being joined.

Please find the mappings below. ts_task and ts_tag are the two tables joined by ts_task_tag.

Any help would be greatly appreciated.

Code:
   <!-- Task mapping -->
    <class name="com.test.techbase.tasker.Task" table="ts_task" lazy="true">
        <id name="id" column="Id">
            <generator class="assigned" />
        </id>
        <property name="name" column="Name" />
        <property name="dateCreated" column="DateCreated" type="timestamp" lazy="true" />
        <property name="dateDue" column="DateDue" type="timestamp" lazy="true" />
        <property name="dateCompleted" column="DateCompleted" type="timestamp" lazy="true" />
      <property name="note" column="Note" type="text" lazy="true" />
      <bag name="tags" table="ts_task_tag" lazy="false" cascade="all" inverse="false">
         <key column="TaskId" />
         <many-to-many column="TagId" class="com.test.techbase.tasker.Tag" />
      </bag>
    </class>

   <!-- Tag mapping -->
   <class name="com.test.techbase.tasker.Tag" table="ts_tag">
      <id name="id" column="Id">
         <generator class="assigned" />
      </id>
      <property name="name" column="Name" unique="true" />
      <property name="dateCreated" column="DateCreated" type="timestamp" lazy="true" />
   </class>



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.