Answer the question
In order to leave comments, you need to log in
How to create a table in Hibernate without a unique Id?
Hello! In tables, you cannot add an additional field (Id) and there are no unique values. Are there ways to create a table through Hibernate or will I have to create it myself in the database and write a query through jdbcTemplate? Is it possible to make Id not a unique value?
Answer the question
In order to leave comments, you need to log in
If I understand you correctly, then you are going to store some data in the table whose id is not a unique value. You can in any case have a unique one. id by adding an annotation @Id
And you can save a non-unique id as another field. For example, nativeId
Is it possible to make Id not a unique value?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question