I’m new to JPA and I’m learning a lot about it. I recently deployed an application with EclipseLink as my JPA provider and it is running well.
Now there is a need to add an extra column to one of the mapped tables. This extra field is for reporting purposes and does not affect my application, so I really don’t want to touch something that is working well. I will of course update my application in due time to include this field in my mappings but I don’t want to do it just now.
This column addition will be done externally by the DBA directly to the tables. Will this addition break my application?
I believe that this should not happens since there is no change in the mapped fields and as far as JPA is concerned nothing has changed. JPA will not be aware of what was added so everything should work without breaking.
Please correct me if I’m wrong. Thanks.
You can do it there’s no reason it could break, JPA does not force you to map every column to a field in your entity. Except if the new column is mandatory (
NOT NULL) and does not have a default value (on insert for example).