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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -