-->
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.  [ 2 posts ] 
Author Message
 Post subject: XDoclet 2 map declaration problem
PostPosted: Thu May 19, 2005 1:57 am 
Beginner
Beginner

Joined: Thu Dec 25, 2003 8:08 am
Posts: 26
I'm trying to declare a persistent map.
My XDoclet look like this:
Code:
    /**
     * @return Returns the properties.
     * @hibernate.map
     *  lazy="true" cascade="delete"
     * @hibernate.map-key
     *  column="name" type="string"
     * @hibernare.key
     *  column="moduleConfigId"
     *  type="com.mapping.IdHibernateType"
     * @hibernate.one-to-many
     *  class="com.config.ConfigPropertyBO"
     */
    public Map getProperties() {
        return m_properties;
    }


Somehow the mapping xml 'key' and 'map-key' are missing some attributes:
Code:
<hibernate-mapping>
  <class table="ModuleConfig" name="com.config.ModuleConfigBO">
    <id unsaved-value="0" name="id" type="com.mapping.IdHibernateType" column="Id">
      <generator class="com.mapping.IdGenerator"/>
    </id>
    <version unsaved-value="undefined" name="version"/>
    <property name="name"/>
    <map cascade="delete" lazy="true" name="properties">
      <key/>
      <map-key/>
      <one-to-many class="com.config.ConfigPropertyBO"/>
    </map>
    <property name="hidden"/>
  </class>
</hibernate-mapping>


Hibernate version:
3.0

What am I doing wrong?


Top
 Profile  
 
 Post subject: Re: XDoclet 2 map declaration problem
PostPosted: Thu May 26, 2005 7:53 am 
Beginner
Beginner

Joined: Fri Mar 12, 2004 1:12 pm
Posts: 25
Location: Minsk, Belarus
TheKing99 wrote:
I'm trying to declare a persistent map.
My XDoclet look like this:
Code:
    /**
     * @return Returns the properties.
     * @hibernate.map
     *  lazy="true" cascade="delete"
     * @hibernate.map-key
     *  column="name" type="string"
     * @hibernare.key
     *  column="moduleConfigId"
     *  type="com.mapping.IdHibernateType"
     * @hibernate.one-to-many
     *  class="com.config.ConfigPropertyBO"
     */
    public Map getProperties() {
        return m_properties;
    }


Somehow the mapping xml 'key' and 'map-key' are missing some attributes:
Code:
<hibernate-mapping>
  <class table="ModuleConfig" name="com.config.ModuleConfigBO">
    <id unsaved-value="0" name="id" type="com.mapping.IdHibernateType" column="Id">
      <generator class="com.mapping.IdGenerator"/>
    </id>
    <version unsaved-value="undefined" name="version"/>
    <property name="name"/>
    <map cascade="delete" lazy="true" name="properties">
      <key/>
      <map-key/>
      <one-to-many class="com.config.ConfigPropertyBO"/>
    </map>
    <property name="hidden"/>
  </class>
</hibernate-mapping>


Hibernate version:
3.0

What am I doing wrong?


Very strange. It should work. At least tests from repository are passed for
/**
* @hibernate.map
* @hibernate.key column="userName"
* @hibernate.map-key column="attributeName" type="string"
* @hibernate.element column="attributeValue" type="serializable" not-null="true"
*/

Anyway lets move our conversation to project maillist
http://sourceforge.net/mail/?group_id=88133


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.