[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] HistoryPolicy - genenerate tables
|
Hello all,
I have question: Does HistoryPolicy support automatic generation of history table? EclipseLink 2.3 stable.
I have following setting in PU definition. Table for entity is dropped and then created. Table for history is not. Is this correct?
<property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
Entity customizer:
@Override
public void customize(final ClassDescriptor descriptor) throws Exception {
HistoryPolicy policy = new HistoryPolicy();
policy.addHistoryTableName("ENTITY_HIST");
policy.addStartFieldName("START_DATE");
policy.addEndFieldName("END_DATE");
policy.setShouldHandleWrites(true);
descriptor.setHistoryPolicy(policy);
}
After I create history table manually all history updates works as expected (persist, modify, delete).
Thank you for help
Martin
PS I can't find information about DDL generation for HistoryPolicy in examples and wiki.