File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
grace-datastore-gorm/src/main/groovy/org/grails/compiler/gorm Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2015 original authors
2+ * Copyright 2015-2025 original authors
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -92,6 +92,7 @@ import static org.codehaus.groovy.ast.tools.GeneralUtils.returnS
9292 * - Named query methods<br >
9393 *
9494 * @author Graeme Rocher
95+ * @author Michael Yan
9596 * @since 5.0
9697 */
9798@CompileStatic
@@ -187,6 +188,13 @@ class GormEntityTransformation extends AbstractASTTransformation implements Comp
187188 // Only GORM classes on the classpath continue
188189 }
189190 }
191+ try {
192+ AstUtils . addAnnotationOrGetExisting(classNode,
193+ (Class<? extends Annotation > ) getClass(). classLoader. loadClass(' grails.artefact.Artefact' ),
194+ [value : ' Domain' ] as Map<String , Object > )
195+ }
196+ catch (Throwable ignored) {
197+ }
190198 }
191199
192200 // Add the Jackson @JsonIgnoreProperties if Jackson is present
You can’t perform that action at this time.
0 commit comments