rootEntityDescriptor.setOptimisticLockStyle( hierarchySource.getOptimisticLockStyle() ); rootEntityDescriptor.setMutable( hierarchySource.isMutable() ); rootEntityDescriptor.setWhere( hierarchySource.getWhere() );
rootClass.setOptimisticLockStyle( OptimisticLockStyle.VERSION ); if ( traceEnabled ) { LOG.tracev( "Version name: {0}, unsavedValue: {1}", rootClass.getVersion().getName(),
private void bindVersionProperty(Table table, TableIdentifier identifier, Column column, RootClass rc, Set<Column> processed, Mapping mapping) { processed.add(column); String propertyName = revengStrategy.columnToPropertyName( identifier, column.getName() ); Property property = bindBasicProperty(BinderUtils.makeUnique(rc, propertyName), table, column, processed, mapping); rc.addProperty(property); rc.setVersion(property); rc.setOptimisticLockStyle(OptimisticLockStyle.VERSION); log.debug("Column " + column.getName() + " will be used for <version>/<timestamp> columns in " + identifier); }
private void bindVersionProperty(Table table, TableIdentifier identifier, Column column, RootClass rc, Set<Column> processed, Mapping mapping) { processed.add(column); String propertyName = revengStrategy.columnToPropertyName( identifier, column.getName() ); Property property = bindBasicProperty(BinderUtils.makeUnique(rc, propertyName), table, column, processed, mapping); rc.addProperty(property); rc.setVersion(property); rc.setOptimisticLockStyle(OptimisticLockStyle.VERSION); log.debug("Column " + column.getName() + " will be used for <version>/<timestamp> columns in " + identifier); }
rootEntityDescriptor.setOptimisticLockStyle( hierarchySource.getOptimisticLockStyle() ); rootEntityDescriptor.setMutable( hierarchySource.isMutable() ); rootEntityDescriptor.setWhere( hierarchySource.getWhere() );