-->
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.  [ 5 posts ] 
Author Message
 Post subject: Strange error with "property-ref"!?
PostPosted: Mon Dec 15, 2003 10:48 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
I'm using Hibernate 2.0.3.

-------------------------------------------
Here's a peace of my mapping file
-------------------------------------------

( ... )
<!-- bi-directional one-to-one association to OpControloSq0589 -->
<one-to-one
name="opControloSq0589"
class="xpto.OpControloSq0589"
outer-join="auto"
constrained="true"
property-ref="opFk"
column="op_fk"
/>
( ... )

------------------------------------------
When I execute my test code I get:
------------------------------------------

ERROR: Error parsing XML: XML InputStream(122)
org.xml.sax.SAXParseException: Attribute "property-ref" must be declared for element type "one-to-one".
( ... )

It's weird because the "property-ref" is really used for a "one-to-one" association in my mapping file!?

Is it a bug? Please help.

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2003 11:29 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
property-ref is a 2.1 feature. The error refers to a lack into the DTD, the DTD must reference property-ref.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2003 2:07 pm 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
epbernard wrote:
property-ref is a 2.1 feature. The error refers to a lack into the DTD, the DTD must reference property-ref.


I'm using the DTD:
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd

In the following page:
http://www.hibernate.org/68.html

it says that the DTD is the same (2.1 and 2.0.3).

And I saw the DTD above and the one-to-one element has the attribute "property-ref".
So I'm confused. It exists in fact.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2003 2:23 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You're using hibernate 2.0.3 and Hibernate will start looking the DTD in the jar before looking for internet.

The DTD policy of Hibernate is not to update the DTD version if it's backward compatible. The site DTD is uptodate with hibernate 2.1 final.
Be sure to use your local DTD to have proper DTD checks.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 16, 2003 4:55 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
epbernard wrote:
You're using hibernate 2.0.3 and Hibernate will start looking the DTD in the jar before looking for internet.

The DTD policy of Hibernate is not to update the DTD version if it's backward compatible. The site DTD is uptodate with hibernate 2.1 final.
Be sure to use your local DTD to have proper DTD checks.


You are right. In fact the DTD shiped with the jar doesn't have "property-ref" for the "one-to-one" element.

Thanks for the tip.


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