-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically Set CreatedAt and UpdatedAt #244
Conversation
public class Leaderboard : ICreatedAt, IUpdatedAt Alternatively as I've said in the channel; we just do a base class with all three timestamps, and have classes inherit that |
Having one base class with all three is impossible since some tables have CreatedAt but not UpdatedAt. I couldn't see an easy way to automate DeletedAt so I'm keeping that one manual for now. Would you still like to me get rid of the inheritance? |
47511bc
to
2c8dfed
Compare
Yeah nah just keep what you have. Don't have to that class inheritance thing. |
How'd you figure out on how to add methods in ApplicationContext like that? |
I'm actually a wizard IRL. Also I read this article. |
Would |
I'm not sure but it doesn't really matter either way as far as I'm concerned. |
What it says on the tin. Had to mess with the tests a bit to get this working properly. Also removes erroneously overridden
Equals
andGetHashCode
on models (this is a no-no). Closes #237