File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,9 @@ export class PrismaSchemaGenerator {
171171 }
172172
173173 const allAttributes = getAllAttributes ( decl ) ;
174- for ( const attr of allAttributes . filter ( ( attr ) => this . isPrismaAttribute ( attr ) ) ) {
174+ for ( const attr of allAttributes . filter (
175+ ( attr ) => this . isPrismaAttribute ( attr ) && ! this . isInheritedMapAttribute ( attr , decl ) ,
176+ ) ) {
175177 this . generateContainerAttribute ( model , attr ) ;
176178 }
177179
@@ -185,6 +187,15 @@ export class PrismaSchemaGenerator {
185187 this . generateDelegateRelationForConcrete ( model , decl ) ;
186188 }
187189
190+ private isInheritedMapAttribute ( attr : DataModelAttribute , contextModel : DataModel ) {
191+ if ( attr . $container === contextModel ) {
192+ return false ;
193+ }
194+
195+ const attrName = attr . decl . ref ?. name ?? attr . decl . $refText ;
196+ return attrName === '@@map' ;
197+ }
198+
188199 private isPrismaAttribute ( attr : DataModelAttribute | DataFieldAttribute ) {
189200 if ( ! attr . decl . ref ) {
190201 return false ;
You can’t perform that action at this time.
0 commit comments