mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#275 - ENH: Add support for @SequenceGenerator initialValue and allocationSize
This commit is contained in:
1 parent
6c37dc494b
commit
2ed5e026e0
6 files changed
+70
-14
No files matched your search
@@ -36,12 +36,14 @@ public class CreateSequenceVisitor implements BeanVisitor {
|
||||
+" as DatabasePlatform does not support sequences";
|
||||
logger.warn(msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (descriptor.getSequenceName() != null) {
|
||||
ctx.write("create sequence ");
|
||||
ctx.write(descriptor.getSequenceName());
|
||||
ctx.write(";").writeNewLine().writeNewLine();
|
||||
String sequenceName = descriptor.getSequenceName();
|
||||
if (sequenceName != null) {
|
||||
int initialValue = descriptor.getSequenceInitialValue();
|
||||
int allocationSize = descriptor.getSequenceAllocationSize();
|
||||
String createSeq = ctx.getDbPlatform().ddlCreateSequence(sequenceName, initialValue, allocationSize);
|
||||
ctx.write(createSeq).writeNewLine().writeNewLine();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user