Spring + Hibernate : a different object with the same identifier value was already associated with the session
In my application, which uses Spring and Hibernate, I parse a CSV file and populate the db by calling handleRow() every time a record is read from the CSV file. My domain model: 'Family' has many 'SubFamily' 'SubFamily' has many 'Locus' a 'Locus' belongs to a 'Species' Family <-> SubFamily <-> Locus are all bi-directional mappings. Code: public void handleRow(Family dummyFamily, SubFamily dummySubFamily, Locus dummyLocus) { //Service method which access DAO layers CommonService serv = ctx.getCommonService(); boolean newFamily=false; Family family=serv.getFamilyByFamilyId(dummyFamily