Hibernate: Parent and Child relationship data structure
问题 Source Table Folder Table:- folder_id,folder_name,parent_id --------------------------------- 1,7-Zip,NULL 2,7z,1 3,Lang,1 File Table:- file_id,file_name,folder_id --------------------------------- 1,7-zip.chm,1 2,7-zip.dll,1 3,7z.dll,3 4,af.txt,3 when i inserted data, the data structure was like below (Size of DS is 1) [1,7-Zip, childFolders[[2,7z],[3,Lang,childFolders[], childFiles[[3,7z.dll],[4,af.txt]]]], childfiles[[1,7-zip.chm],[2,7-zip.dll]]] when retrieved the data from the data base