Update the database description or schema for the given class and all classes it depends on. This method is used after you have made changes to the definition of a class. If this method is called with a class that has not been changed it has no effect. The following changes ARE supported:
* Add a property.
* Remove a property.
* Change a property from a primitive to the corresponding reference type, for example from double to Double. The opposite (Double to double) is possible, but not encouraged as it is entirely up to your code how any nulls existing in the database are handled.
* Change a property from one reference type to another. If the new type is a supertype or implemented by the original type, either directly or indirectly, references will be preserved. In other words, properties can be made more general, not less. For example, it is possible to change from ArrayList to List, but not the other way around, without losing data. Any non-compatible references will be dropped. If a property refers to both List and ArrayList objects and is converted from List to ArrayList (the 'wrong' way) all List references will be deleted.
* Change a reference type to a primitive, or the other way around, for example from String to java.util.Date. Please observe that this WILL result in all old references being null. This has the same effect as dropping the property and creating a new one. You probably don't want this, but you can. This does not apply to the reference types that directly correspond to primitive types (see above).
The following changes ARE NOT supported:
* Rename a property. For this see the {@link #renameProperties(Class)}method.
To carry out any of the supported changes, just pass a Class object you want changed to this method. If you are changing a property from primitive to reference or the other way, you do not even need to call this method, just start using the new class.
If you wish to implement any other changes, you have to do this in a two-step approach:
1. Create an intermediary class, and read all of the old objects into it. Store the objects as intermediary classes.
2. Drop the old class, and copy from the intermediary class to the new class, storing it.
In this case you do not use the updateSchema method.
@param klass
@throws SQLException