Support for @Identity - with start, increment, cache

This commit is contained in:
rob bygrave
2020-03-04 16:59:42 +13:00
parent 9410f82f5a
commit 2ac19bea1a
41 changed files with 510 additions and 115 deletions
@@ -7,6 +7,7 @@ import io.ebean.annotation.DocStore;
import io.ebean.annotation.Draftable;
import io.ebean.annotation.DraftableElement;
import io.ebean.annotation.History;
import io.ebean.annotation.Identity;
import io.ebean.annotation.Index;
import io.ebean.annotation.InvalidateQueryCache;
import io.ebean.annotation.ReadAudit;
@@ -122,6 +123,11 @@ public class AnnotationClass extends AnnotationParser {
}
}
Identity identity = findAnnotationRecursive(cls, Identity.class);
if (identity != null) {
descriptor.setIdentityMode(identity);
}
IdClass idClass = findAnnotationRecursive(cls, IdClass.class);
if (idClass != null) {
descriptor.setIdClass(idClass.value());