Answer the question
In order to leave comments, you need to log in
How to correctly insert a record into a linked table in Hibernate?
Good afternoon, could you please tell me what to do in this situation?
There is a database.
It has a main table with results, and a couple of tables with clarifying entries, it reflects what the measurement was done in.
In the code it looks like this, I removed everything unnecessary. Of course, all this is covered with annotations.
first table
private int id;
private float result;
private index index;
private int id;
private String name;
Answer the question
In order to leave comments, you need to log in
I understand you have one entity and several tables for it? Are you using @SecondaryTable to link tables?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question