java - Join columns of different types in Hibernate -
I have 2 tables in table 1 column 'id', which is a number. Table 2 has a column called entity_id , which is the varchar . Table 1 has many relationships with Table 2. Here is my hibernate mapping for table 1 @intextyTable (name = "Table1") public class table 1 tool serializable {Private long ID; Private listing & lt; Table2 & gt; notes; @ Id @ column (name = "id") public long id () {return id; } Public Zero Set ID (Long ID) {this.id = id; } @OneToMany (fetch = FetchType.EAGER, targetEntity = Table2.class) @thet (FetchMode.JOIN) @JoinColumn (name = "ENTITY_ID", referenced column name = "id") public list & lt; Table2 & gt; GetNotes () {return stores notes; } Public Zero Setnotes (list & lt; Table2 & gt; notes) {this.notes = notes; }} When I create a citricar with Table 1 and try to list the data, then I am getting an invalid number error because the type in the column is not mismatched. Can you please t...