first of all, kindly @ design, i have 2 tables t1(a,b,c,d)- primary key t2(a,e) (a,e) composite primary key foreign key referencing t1(a) t1 - t2 relationship 1 many. so created 3 classes c1 t1 has 5 fields - a,b,c,d, c2set setters & getters c2 t2 has 2 fields- c1,c3 of type c1, c3 respectively- setters & getters c3 defining c3 represent composite primary key of t2 has 2 fields (a,e) setters & getters i using following annotations define hibernate mappings in classes c1,c2,c3 respectively 1. @entity @table(name = "t1", schema = "dbo", uniqueconstraints = { @uniqueconstraint(columnnames = "a") }) @id @column(name = "a", unique = true, nullable = false) @transient private set<c2> c2set = new hashset<c2>(); @onetomany(fetch = fetchtype.eager, mappedby = "c1") public set<c2> getc2set() { return c2set; } 2. @entity @table(name="t2", schema...