-->
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: my mapping xml file giving the following error
PostPosted: Wed Jul 19, 2006 2:01 am 
Newbie

Joined: Wed Jul 19, 2006 12:53 am
Posts: 3
ERROR [XMLHelper] Error parsing XML: XML InputStream(7) The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array|query-list)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*)".


this is my xml file


<?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="myHibernateTry">
<class name="Info" table="Info">
<property name="rollnumber" column="rollnumber" type="int" />
<property name="name" column="name" type="varchar" />
</class>
</hibernate-mapping>


can anyone let me what isthe mistake am doing

thanx in advance


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 19, 2006 2:15 am 
Regular
Regular

Joined: Sat Nov 06, 2004 5:20 pm
Posts: 54
Location: Collierville, TN
You might want to add an id element for your primary key.

example:
Code:
<id name="yourPkName" type="int">
            <column name="yourPkName" />
            <generator class="assigned" />
</id>


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.