Add support for Postgres range partition DDL plus refactor xsd definitions that had got out of sync (#1465)

* Add partition meta mapping

* Fix to allow schema prefix on select dynamic formula

* Add partition meta mapping

* Migration XSD Update

* Fix to allow schema prefix on select dynamic formula

* Bump ebean-migration to 11.8.1
This commit is contained in:
Rob Bygrave
2018-08-08 23:29:29 +12:00
committed by GitHub
parent c9497fd654
commit ded7d44974
46 changed files with 639 additions and 290 deletions
@@ -2,6 +2,7 @@ package io.ebeaninternal.server.deploy.parse;
import io.ebean.annotation.Cache;
import io.ebean.annotation.DbComment;
import io.ebean.annotation.DbPartition;
import io.ebean.annotation.DocStore;
import io.ebean.annotation.Draftable;
import io.ebean.annotation.DraftableElement;
@@ -16,6 +17,7 @@ import io.ebean.util.AnnotationUtil;
import io.ebeaninternal.server.deploy.BeanDescriptor.EntityType;
import io.ebeaninternal.server.deploy.IndexDefinition;
import io.ebeaninternal.server.deploy.InheritInfo;
import io.ebeaninternal.server.deploy.PartitionMeta;
import io.ebeaninternal.server.deploy.meta.DeployBeanProperty;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -152,6 +154,11 @@ public class AnnotationClass extends AnnotationParser {
}
}
DbPartition partition = AnnotationUtil.findAnnotationRecursive(cls, DbPartition.class);
if (partition != null) {
descriptor.setPartitionMeta(new PartitionMeta(partition.mode(), partition.property()));
}
Draftable draftable = AnnotationUtil.findAnnotationRecursive(cls, Draftable.class);
if (draftable != null) {
descriptor.setDraftable();