I have a critical issue. I have a table
TICKETINFO
TICKETINFOID pk, REMARK varchar(128), TICKETDATE timestamp
it has a corresponding class with hibernate annotation which somewhat looks like this
@Entity
@Table(name = "TICKETINFO")
public class Ticketinfo implements Serializable {
@Id
@Column(name = "TICKETINFOID")
private Long id;
@Column(name = "TICKETDATE")
private String date;
@column(name = "REMARK")
private string remark;
//getters and setters
}
now my work is that i need to create a child table of TICKETINFO table
TICKETINFO_REMARK
TICKETINFO_REMARK_ID pk, TICKETINFOID fk, REMARK varchar(128)
and TICKETINFOID will be foreign key from TICKETINFO table and have to populate the REMARK field of TICKETINFO_REMARK along with the REMARK field of TICKETINFO for the corresponding TICKETINFOID.
For 1 TICKETINFOID there will be one REMARK and it could be null. The datatype of REMARK in Ticketinfo.java have to keep it as string.I can add extra logic but cannot change the existing flow.
Please help me as I am in a terrible mess....