File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -1900,10 +1900,22 @@ ClassMethod ExpandClasses(externalName As %String) As %List
19001900 set internalName = $Piece (externalName ," ." ,1 ,*-1 )
19011901 set internalName = $Extract (internalName ,4 ,*)
19021902 set internalName = $Translate (internalName ," /\%" ," .." _..PercentClassReplace ())
1903- &sql (select %DLIST(Name) into :classes from %Dictionary .ClassDefinition where Name like '%'||:internalName )
1904- if (SQLCODE < 0 ) {
1905- Throw ##class (%Exception.SQL ).CreateFromSQLCODE (SQLCODE ,%msg )
1906- }
1903+ do {
1904+ &sql (select %DLIST(Name) into :classes from %Dictionary .ClassDefinition where Name like '%'||:internalName )
1905+ if (SQLCODE < 0 ) {
1906+ Throw ##class (%Exception.SQL ).CreateFromSQLCODE (SQLCODE ,%msg )
1907+ }
1908+
1909+ // If nothing was found then remove period-delimited pieces from the start of internalName
1910+ // until we either find something or run out of pieces.
1911+ // This will allow for classes to potentially still be identified when the
1912+ // repository directory structure does not align with class packages.
1913+ if ($ListLength (classes ) = 0 ) {
1914+ set internalName = $Piece (internalName ," ." ,2 ,*)
1915+ } else {
1916+ set internalName = " "
1917+ }
1918+ } while (internalName '= " " )
19071919 quit classes
19081920}
19091921
You can’t perform that action at this time.
0 commit comments