scene:
Floor entity has dormitories (Set) field,Dormitory entity has student (Set) field,when I import them from an excel table and batch save students use hibernate ,the struct of the excel table like that
Clearly there is no 'floor.ID' or 'dormitory.ID' field in the table,so hibernate will insert a new floor entity into database=-=.and then---->
solution:
After I get student entity I query the
网友评论