java - Updating JPA Entity Model -


i have application running on google app engine uses jpa. imagine @ point, application evolves, new attributes added java classes, requiring update jpa model. how changes handled once application in production?

for example, lets add new field (foo) class (bar), , foo isn't nullable. during course of transaction, entitymanager reads in old bar object(before foo added), updates field, , tries commit change, , exception happens. want guard against.

in general, there best practice updating jpa model after it's been put production avoid constraint conflicts older objects have been persisted?

unfortunately updating model not trivial in gae. you'll have either update existing entities or create "update on demand" entities don't fail new conditions.

adding not nullable field example forces update entities beforehand jpa not allow afterwards.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -