Skip to content
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

Lifecycle hooks not run if defined on base entity #104

Closed
joshstrange opened this issue Aug 24, 2019 · 2 comments
Closed

Lifecycle hooks not run if defined on base entity #104

joshstrange opened this issue Aug 24, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@joshstrange
Copy link

I was trying to setup my base entity to have @BeforeCreate and @BeforeUpdate hooks on it to handle setting some common fields (id, created, createdBy, updated, updatedBy, etc) but they seem to be ignored. They work fine if I put them on one of my my main entities, just not on the base one I extend from.

Is this possible or is there a better way to define this functionality once and reuse it?

@B4nan
Copy link
Member

B4nan commented Aug 25, 2019

I guess they are ignored, but not intentionally. Will fix this next week, I am out on vacation with very limited internet access.

Or feel free to send a PR, the problem will be in MetadataDiscovery class, in the method that defines base entity properties.

@B4nan B4nan added the bug Something isn't working label Aug 25, 2019
@B4nan B4nan closed this as completed in 6938398 Sep 1, 2019
@B4nan
Copy link
Member

B4nan commented Sep 1, 2019

Fix released as v2.7.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants