Forums Register Login

Hibernate mapping producing duplicate data from DB

+Pie Number of slices to send: Send
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
Willie Smits can speak 40 languages. This tiny ad can speak only one:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 448 times.
Similar Threads
Cascading non foreign key to Child Table
One-to-One Hibernate\Spring , Child not inserted
Help HIGHLY needed with one-to-one mapping error
Hibernate Newbie - 1 to Many Relation Tutorial
delete option of cascade in Hibernate one-to-one association
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 22:43:35.