@@ -175,6 +175,13 @@ public TableAttribute GetEntityTableAttribute(Type type)
175175 case MappingPriorityType . Aop :
176176 if ( _orm . Aop . ConfigEntityHandler != null )
177177 {
178+ var aopeIndexsPriorityTypes = new List < MappingPriorityType > ( ) ;
179+ foreach ( var aipt in _mappingPriorityTypes )
180+ {
181+ if ( aipt == MappingPriorityType . Aop ) break ;
182+ else aopeIndexsPriorityTypes . Add ( aipt ) ;
183+ }
184+ var aopeIndexs = GetEntityIndexAttribute ( type , aopeIndexsPriorityTypes . ToArray ( ) ) ;
178185 var aope = new Aop . ConfigEntityEventArgs ( type )
179186 {
180187 ModifyResult = new TableAttribute
@@ -183,7 +190,8 @@ public TableAttribute GetEntityTableAttribute(Type type)
183190 OldName = attr . OldName ,
184191 _DisableSyncStructure = attr . _DisableSyncStructure ,
185192 AsTable = attr . AsTable
186- }
193+ } ,
194+ ModifyIndexResult = aopeIndexs . ToList ( )
187195 } ;
188196 _orm . Aop . ConfigEntityHandler ( _orm , aope ) ;
189197 var tryattr = aope . ModifyResult ;
@@ -412,10 +420,11 @@ public NavigateAttribute GetEntityNavigateAttribute(Type type, PropertyInfo prot
412420 if ( attr . ManyToMany != null ) ret = attr ;
413421 return ret ;
414422 }
415- public IndexAttribute [ ] GetEntityIndexAttribute ( Type type )
423+ public IndexAttribute [ ] GetEntityIndexAttribute ( Type type , MappingPriorityType [ ] mappingPriorityTypes )
416424 {
425+ if ( mappingPriorityTypes == null ) mappingPriorityTypes = _mappingPriorityTypes ;
417426 var ret = new Dictionary < string , IndexAttribute > ( ) ;
418- foreach ( var mp in _mappingPriorityTypes )
427+ foreach ( var mp in mappingPriorityTypes )
419428 {
420429 switch ( mp )
421430 {
0 commit comments