I want to connect to a database with lot of tables with Java Spring MVC.
Currently, I am coding one class for each table. Ex;
@Table(name = "sa_user") //table name
public class SaUser implements Serializable {
private static long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "sa_user_id")
private Integer saUserId;
...
...
}
Do I have to write these class for all of the tables. This is a huge task. What is the best way?