-->
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 with cascading
PostPosted: Tue Mar 27, 2007 5:39 am 
Newbie

Joined: Tue Mar 20, 2007 11:48 am
Posts: 11
Hi,

I'm struggling with a problem to have changes made in a Collection get persistent. I tried the following:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="libraryImpl">
   
<class name="ItemImpl" table="items">
   <id name="id" type="long" column="id" unsaved-value="-1">
      <generator class="native" />
   </id>
   <property name="title" type="string" column="title" />
   <property name="author" type="string" column="author" />
   <property name="publisher" type="string" column="publisher" />
   <property name="description" type="string" column="description" />
   <property name="technologies" type="string" column="technologies" />
   <property name="comments" type="string" column="comments" />
   <many-to-one name="type" class="TypeImpl" column="typeId" lazy="false" />
   <bag name="hireDetails" cascade="all" inverse="true" lazy="false">
      <key column="itemId" />
      <one-to-many class="HireDetailsImpl" />
   </bag>
   <property name="quantity" type="integer" column="quantity" />
</class>
   
</hibernate-mapping>


Changes made in my collection aren't made persistent. Any ideas?

Thanks in advance.


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.