• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, this is exactly what we have discussed here.
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic