This is my entity.
@Table(uniqueConstraints = { @UniqueConstraint(columnNames = { "code" } })
@Entity
public class Product extends ExtendedModel {
private static final long serialVersionUID = 8986161490957095179L;
@Column(columnDefinition = "Ürün Kodu")
private String code;
private String name;
I want to get name of the uniq column.
I usually use this method.
columnName = myClass.getClass().getDeclaredField("code").getDeclaredAnnotation(Column.class)
.columnDefinition();
But i want to give name by dynamically. How to get uniq column name?