File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
modules/fundamental/src/sbom/service Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -128,13 +128,17 @@ impl SbomService {
128128 sbom:: Entity :: find ( ) . filter ( Expr :: col ( sbom:: Column :: Labels ) . contains ( labels) )
129129 } ;
130130 let limiter = query
131+ . distinct_on ( [ ( sbom:: Entity , sbom:: Column :: SbomId ) ] )
132+ . order_by_asc ( sbom:: Column :: SbomId )
131133 . join ( JoinType :: Join , sbom:: Relation :: SourceDocument . def ( ) )
134+ . join ( JoinType :: Join , sbom:: Relation :: Packages . def ( ) ) // Use inner join for sbom_package for filtering
132135 . find_also_linked ( SbomNodeLink )
133136 . filtering_with (
134137 search,
135138 Columns :: from_entity :: < sbom:: Entity > ( )
136139 . add_columns ( sbom_node:: Entity )
137140 . add_columns ( source_document:: Entity )
141+ . add_columns ( sbom_package:: Entity )
138142 . alias ( "sbom_node" , "r0" )
139143 . translator ( |f, op, v| match f. split_once ( ':' ) {
140144 Some ( ( "label" , key) ) => Some ( format ! ( "labels:{key}{op}{v}" ) ) ,
You can’t perform that action at this time.
0 commit comments