Yes, this is possible. You can specify your tables name and prefix them in a single entity class.
@Entity@Table(name="student")@SecondaryTables({
@SecondaryTable(name="name", pkJoinColumns={
@PrimaryKeyJoinColumn(name="id", referencedColumnName="student_id") }),
@SecondaryTable(name="address", pkJoinColumns={
@PrimaryKeyJoinColumn(name="id", referencedColumnName="student_id") })})
public class Student implements Serializable {
@Id
@Column(name="student_id")
private int studentId;
@Column(table="name")
private String name;
@Column(table="address")
private String address;
public Student(){}
public Student(int studentId){
this.studentId=studentId;
}
//getters and setters
}
You can use this piece of code.