Guice Persist seems to silently fail if the class is final
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 1.7k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
I'm using a web framework (Ninja) that incorporates Guice Persist. I'm a newbie to all these technologies so have been cargo culting quite a lot of it.
I just wasted about five hours tracking down a very nasty bug in my code. My problem was that my DAO (the one that has an injected EntityManager and methods with the Transactional annotation) was declared final - actually it was done this way automatically because I'm experimenting with the Kotlin language from JetBrains which makes classes final by default. I didn't notice this. Neither did Guice - all that happened was database writes got silently ignored. No errors or anything.
Ideally, if Guice can't set up a DAO correctly because it's been declared final it would throw an exception so you find out what's wrong immediately instead of just silently doing nothing.
If the bug is NOT in Guice Persist then I apologise in advance. Like I said, I'm knee deep in frameworks right now and the bug might also be in Ninja, or Hibernate, or ..... somewhere else.
Contributor guide
Assessment
This issue has not been assessed yet.