Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Validating Hibernate mapping file with -set- and -join- elements

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using Hibernate 3

I have a problem validating a mapping file that contains and elements.

Java classes:






DB Tables (Postgresql 8.2):



* tbl_agents and tbl_agenthistories are 1-to-1
* tbl_agents and tbl_retailproperties are 1-to-n
* I have no control over the db schema (ie. I cannot change it)


Agent.hbm.xml:



RetailProperty.hbm.xml:



RetailProperty.hbm.xml validates. But when I try to validate Agent.hbm.xml I get this:



Which usually means to me that something is wrong with the mapping file. Is there anything in my mapping files that I'm missing?

Note that when I comment out either the <set> or <join> element in Agent.hbm.xml it validates.
 
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I put the <set> before the <join>, the mapping file validates. Apparently, the DTD requires this order.
[ October 26, 2007: Message edited by: Edvins Reisons ]
 
M Navasca
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey that worked! I can't believe it was something so trivial.

thanks
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI
I think we have to use the elements in the order what defined in the DTD?
Am I right?
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this is exactly what we have discussed here.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic