I have a JPA entity that is not currently annotated with either @DynamicUpdate or @DynamicInsert. This table has around 30+ columns and a couple of CLOBs too.
Let's say, I already have an entry with ID=123 in the table and need to update a few columns for the same record during request processing. I am updating the respective columns using DTO and then calling the saveAndFlush() method to push the changes into DB.
So, I have two queries related to the following operation
- For the respective operation, what should I use @DynamicUpdate or @DynamicInsert
- Whether either of the annotation i.e. @DynamicUpdate/@DynamicInsert will have any performance impact on the SQL execution