File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -26,20 +26,16 @@ object SearchUtils {
2626
2727 // Get child_of relationships for File
2828 var child_of : ListBuffer [String ] = ListBuffer ()
29- datasets.findByFileIdDirectlyContain(id).map(ds => {
29+ // ...first, the dataset which contains the file or its folder
30+ datasets.findByFileIdAllContain(id).map(ds => {
3031 child_of += ds.id.toString
3132 ds.spaces.map(spid => child_of += spid.toString)
3233 ds.collections.map(collid => child_of += collid.toString)
3334 })
34- val folderlist = folders.findByFileId(id).map(fld => {
35+ // ...second, the immediate parent folder ID (and the folder's parent) itself
36+ folders.findByFileId(id).map(fld => {
3537 child_of += fld.id.toString
3638 child_of += fld.parentDatasetId.toString
37- fld.id
38- })
39- datasets.get(folderlist).found.foreach(ds => {
40- child_of += ds.id.toString
41- ds.spaces.map(spid => child_of += spid.toString)
42- ds.collections.map(collid => child_of += collid.toString)
4339 })
4440 val child_of_distinct = child_of.toList.distinct
4541
You can’t perform that action at this time.
0 commit comments