I personally do think that JPA violations should have another priority. Judging the fact that this non-conformity has not been fixed in almost 2 years time, the priority "Minor" reads as "Won't fix". Furthermore looking at the magnitude of the bug, I can't help but thinking that this bug should take too much time to be fixed. I do realize that there are workarounds. But fortunately this goes for many bugs. Us fellow developers are quite resourceful in finding workarounds. But that shouldn;t not be the indicator of deciding whether or not to fix the bug. Speaking of workarounds. All suggested workarounds are poor from an architectural standpoint:
- workaround in DAO: this is not desirable because a simple POJO operation should not have to be done via a DAO. If not using a DAO, the workaroud to manually delete the reference ties the chosen persistence solution tightly to the domain model.
- Altering persistence data by using eventlisteners or @PostUpdate is not advised and error-prone to the best of my knowledge
- Triggers in the database is just aweful. The bug originates from code in the persistence layer and fixing it in a different layer is a no-go in my opinion. Furthermore deleting complex objects where cascading is not always guaranteed might be hard to pull off.
|