wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Hibernate: XML-Mapping to list without index column, or some other workaraound ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate: XML-Mapping to list without index column, or some other workaraound ..." Watch "Hibernate: XML-Mapping to list without index column, or some other workaraound ..." New topic
Author

Hibernate: XML-Mapping to list without index column, or some other workaraound ...

Erich Tiegelholz
Greenhorn

Joined: May 27, 2012
Posts: 10
Hello everyone. I'm quite new to Hibernate and need help in a hopefully simple task.

I do have: An XML mapping of table A to class A.java.

I do have: Another table B that has a common column with A (its value is key in A, but can occur more than once in B), and 2 other columns that I do need in the mapping to class A.

I can map a column region to a Set like this in the XML mapping of table A:


... and do the same for the other column.

But, this does not help me since the order of a Set can be random, and if I get 2 Sets I can't know which values read from B's 2 other columns were in the same row. I do however need this information.

I too can't use mappings to List since B has no index column. (Or is there some way to auto-simulate the existence of one?)

Does anyone know how I can work around my problem? What in need in my Java is the result of


Thanks in advance and kind regards

Eques T.
Erich Tiegelholz
Greenhorn

Joined: May 27, 2012
Posts: 10
Can I use a <composite-element>, and if yes, how?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate: XML-Mapping to list without index column, or some other workaraound ...
 
Similar Threads
validator exception in Struts 1
Table Viewer GUI from a Database
Fetch 10K rows from table
Loading Into Random Table
How to avoid empty tag when marshalling using Castor 1.2