Skip to content

Conversation

@codeconsole
Copy link
Contributor

Previously annotations would only be detected if the super class was another domain class.

This allows a domain class to have parent class that is not a domain class and still utilized the @AutoTimestamp annotation

e.g. this now works and does not work without this fix
src/main/groovy/example/Media.groovy

class Media {
     @AutoTimestamp Date modified
}

grails-app/domain/example/Image.groovy

class Image extends Media {
     String format
}

grails-app/domain/example/Video.groovy

class Media extends Media {
      int frames
}

Copy link
Contributor

@sbglasius sbglasius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good addition, but I would like to see an accompanying test to prove the correctness of the changed code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants