-->
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: Attribute optimistic-lock is not declared for element "
PostPosted: Wed Jun 01, 2005 1:10 pm 
Newbie

Joined: Thu Jan 06, 2005 1:46 pm
Posts: 8
Hi,

13:04:28,000 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(53) Attribute "optimistic-lock" is not declared for element "set".


Hibernate 3.0

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping package="com.agiledss.core.model.internal">

<class name="RpsObj"
table="dwa_obj"
lazy="false">

<!-- Common id property. -->
<id name="id"
column="dwa_obj_id"
type="integer"
unsaved-value="null">

<generator class="hilo">
<param name = "table">dwa_unq_key</param>
<param name = "column">nxt_hgh</param>
<param name="max_lo">0</param>

</generator>
</id>

<!-- A versioned entity. -->
<version name="version"
column="dwa_obj_ver"
access="org.hibernate.property.DirectPropertyAccessor"/>


<set name="rpsObjRelationshipSourceSet"
inverse="true"
lazy="true"
cascade="all-delete-orphan"
optimistic-lock="false">

<key column="dwa_obj_src_id"/>
<one-to-many class="RpsObjRelationship"/>
</set>

.........

If I refer to the documentation =>
(12) optimistic-lock (optional - defaults to true): Species that changes to the state of the collection results in
increment of the owning entity's version. (For one to many associations, it is often reasonable to disable
this setting.)

Did I need to use other kind of Collection ?

Thanks,
LMM


Top
 Profile  
 
 Post subject: Attribute "optimistic-lock" is not declared for el
PostPosted: Wed Jun 01, 2005 2:10 pm 
Newbie

Joined: Thu Jan 06, 2005 1:46 pm
Posts: 8
Sorry for noise,
the problem was after migrating from 2. We need to change the header of each mapping document

FROM
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

TO

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">


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.