-->
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: Leaf, node mapping not working, pseudo composite pattern
PostPosted: Tue Mar 28, 2006 9:23 am 
Newbie

Joined: Mon Sep 26, 2005 10:48 am
Posts: 4
Location: Montevideo, Uruguay
Hi im having a problema whith an hibernate mapping, i like to map a structure like a menu


I have a class named MenuComponent and two subclasses of it, Menu and MenuItem.

A Menu has a list (indexed) of Menu components (could be others menus or menu items)

when i try to persist the menu, it do nothing

can somebody help my whith this problem, what im doing wrong in the mapping file

thanks in advance and sorry for my english y know is very poor


Mapping file


<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="uy.com.jrsoftware.security.accessibility.menu">
<class name="MenuComponent" discriminator-value="menuComponent">

<id name="objectId">
<generator class="native" />
</id>

<discriminator column="componentType"/>

<property name="text" />

<subclass name="Menu" discriminator-value="menu" >
<list name="menuComponents">
<key column="parent"/>
<list-index column="menuComponentsIdx"/>
<one-to-many class="MenuComponent"/>
</list>
</subclass>

<subclass name="MenuItem" discriminator-value="menuItem">
<property name="action" />
</subclass>

</class>
</hibernate-mapping>

_________________
Help each others


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.