• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate mapping producing duplicate data from DB

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have got some mapping that is repeating data assignment for e.g.

I have a Twins table for holding Twin door terminal references and the only Terminals in the database are A1(1) and B1(2). The Twins table has two columns terminalOneID and terminalTwoID as well as an id column for the row. The current data in there... terminalOneID: 1 and terminalTwoID: 2... these link to A1 and B1 terminals in the Terminal table. Whenever I output the IDs of the twin terminals during initializing of the building I am given A1, A1. Could you tell me if this is something to do with my Hibernate mapping? I am new to Hibernate and cannot find a solution.

Here are the relevant XML mapping files:

Twins.hbm.xml


Terminal.hbm.xml


TerminalState.hbm.xml
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic