Let's consider a class Transaction
@Entity
public class Transaction {
@ManyToOne(fetch = FetchType.EAGER)
private Business business;
@Column(name = "business_code")
private String businessCode;
}
which method is more efficient to fetch transactions by business using byBusinessCode which is a column in the table Transaction or using byBusiness so the whole object Business which is a dependency in the class Transaction ?
You need to sign in to view this answers