-->
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: Set of Enum using typedef
PostPosted: Tue Dec 04, 2012 10:04 am 
Newbie

Joined: Wed Nov 28, 2012 6:16 am
Posts: 4
Hallo,

ich versuche per XML-Mapping ein Set von Enum abzuspeichern und benutze dazu folgendes Beispiel: http://stackoverflow.com/questions/2402869/hibernate-how-to-map-an-enumset

Leider wird folgender Fehler geworfen: Caused by: org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 77; Elementtyp "typedef" muss deklariert werden.

UserDetailsDao.hbm.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping
    PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>   
           
    <typedef name="permission" class="GenericEnumUserType">   
        <param name="enumClassName">Permissions</param>
    </typedef>
   
       
    <class name="UserDetailsDao">       
       
        <id name="id">
            <generator class="increment"/>
        </id>
       
        <property name="password" type="string"/>
        <property name="name" type="string"/>
       
        <set name="permissions">
            <key column="id"/>
            <element type="permission"/>
        </set>
       
    </class>
</hibernate-mapping>


Hibernate.cfg.xml:

Code:
...
<mapping resource="UserDetailsDao.hbm.xml"/>
...


Was mache ich hier falsch?

Gruß


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.