-->
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.  [ 6 posts ] 
Author Message
 Post subject: on-delete cascade and composite-element does not work
PostPosted: Fri Apr 01, 2005 5:22 am 
Beginner
Beginner

Joined: Mon Nov 08, 2004 11:58 am
Posts: 29
The following piece of mapping:

<map name="variables" table="FT_O_WFGV" cascade="all,delete-orphan" inverse="true" >
<meta attribute="property-type">Map&lt;String,GlobalVariable></meta>
<key column="workflow_id" on-delete="cascade"/>
<map-key type="string" column="name"/>
<composite-element class="com.j2fe.workflow.definition.GlobalVariable">
<property name="clazz" type="java.lang.Class" column="classname" not-null="true"/>
<property name="value" type="java.lang.Object" column="value" not-null="false"/>
<property name="persistent" type="yes_no" column="persistent" not-null="true"/>
<property name="workflowInput" type="yes_no" column="workflow_input" not-null="true"/>
</composite-element>
</map>

Error durring load

org.hibernate.MappingException: only inverse one-to-many associations may use on-delete="cascade": com.j2fe.workflow.definition.Workflow.variables

Well there is no one-to-many defined here, but actually the map and the composite element impicate that.

Is this a bug or did I miss something?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 01, 2005 5:41 am 
Beginner
Beginner

Joined: Mon Nov 08, 2004 11:58 am
Posts: 29
the same for something like:

<set name="persistentVariables" table="FT_O_WFNV" cascade="all,delete-orphan" >
<meta attribute="property-type">Set&lt;String></meta>
<key column="id" not-null="true" />
<element type="string" not-null="true" column="name"/>
</set>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 13, 2005 10:10 am 
Newbie

Joined: Tue Mar 22, 2005 3:50 pm
Posts: 4
I'm getting the same thing. Sure smells like a bug to me. The documentation certainly doesn't mention any such restriction that I can find.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 13, 2005 10:12 am 
Beginner
Beginner

Joined: Mon Nov 08, 2004 11:58 am
Posts: 29
Could you enter a bug for that and post the id here? thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 14, 2005 4:30 am 
Beginner
Beginner

Joined: Tue Mar 15, 2005 2:36 am
Posts: 32
Location: Bonn, Germany
mkopp wrote:
the same for something like:

<set name="persistentVariables" table="FT_O_WFNV" cascade="all,delete-orphan" >
<meta attribute="property-type">Set&lt;String></meta>
<key column="id" not-null="true" />
<element type="string" not-null="true" column="name"/>
</set>



Isn't there a typo?

Code:
<meta attribute="property-type">Set&lt;String></meta>

Code:
<meta attribute="property-type">Set&lt;String&gt;</meta>


Same goes to the initial posting.

Cheers,
Christian


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 14, 2005 8:55 am 
Beginner
Beginner

Joined: Mon Nov 08, 2004 11:58 am
Posts: 29
no, the greater sign doesn't have to be escaped, it is a common misunderstanding that it has to be. Try it, every complient parser will read it without difficulty


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

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.