File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed 
packages/runtime/src/enhancements Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import {
1212    getIdFields , 
1313    getModelInfo , 
1414    isDelegateModel , 
15-     requireField , 
1615    resolveField , 
1716}  from  '../cross' ; 
1817import  type  {  CrudContract ,  DbClientContract  }  from  '../types' ; 
@@ -153,7 +152,10 @@ export class DelegateProxyHandler extends DefaultPrismaProxyHandler {
153152        for  ( const  kind  of  [ 'select' ,  'include' ]  as  const )  { 
154153            if  ( args [ kind ]  &&  typeof  args [ kind ]  ===  'object' )  { 
155154                for  ( const  [ field ,  value ]  of  Object . entries < any > ( args [ kind ] ) )  { 
156-                     const  fieldInfo  =  requireField ( this . options . modelMeta ,  model ,  field ) ; 
155+                     const  fieldInfo  =  resolveField ( this . options . modelMeta ,  model ,  field ) ; 
156+                     if  ( ! fieldInfo )  { 
157+                         continue ; 
158+                     } 
157159
158160                    if  ( this . isDelegateOrDescendantOfDelegate ( fieldInfo ?. type )  &&  value )  { 
159161                        // delegate model, recursively inject hierarchy 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments