Entity class 1
@Entity
@Table(name = "TICKETS")
public class Ticket {
....
@Column(name = "MERCHANT_NBR")
private String merchant_nbr;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "merchant_nbr", nullable = false)
private Merchant merchant;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name ="merchantNBR", nullable = false)
private merchantDetails merchantDetails;
Entity class 2
@Entity
@Table(name="MERCHANT_DETAILS")
public class merchantDetails {
@Id
@Column(name="MERCHANT_NBR")
private String merchantNBR;
@OneToMany(fetch = FetchType.LAZY)
private Set<Ticket> ticket;
error its giving...invalid column 'merchantNBR'.But I have a column by that name.
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'merchantNBR'.