File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,10 +200,14 @@ connection.onDefinition(
200200 return null ;
201201 }
202202
203+ let namePrefix = CACHED_COMPILE_GRAPH . projectConfig ?. tablePrefix
204+ let linkedTableNameWtPrefix = "" ;
205+ linkedTableNameWtPrefix = ( namePrefix !== undefined ) ? namePrefix + "_" + linkedTable . name : linkedTable . name ;
206+
203207 const foundCompileAction = gatherAllActions ( ) . filter ( action => (
204208 ( linkedTable . database === null || action ?. target ?. database !== undefined && action . target . database === linkedTable . database )
205209 && ( linkedTable . schema === null || action ?. target ?. schema !== undefined && action . target . schema === linkedTable . schema )
206- && action ?. target ?. name !== undefined && action . target . name === linkedTable . name
210+ && action ?. target ?. name !== undefined && ( action . target . name === linkedTable . name || action . target . name === linkedTableNameWtPrefix )
207211 ) ) ;
208212 if ( foundCompileAction . length === 0 ) {
209213 connection . sendNotification ( "error" , `Definition not found for ${ clickedRef } ` ) ;
You can’t perform that action at this time.
0 commit comments