Skip to content

Commit

Permalink
Remove unused @Dynamic annotation
Browse files Browse the repository at this point in the history
Better support for multiple tables
with the same Schema is underway.
  • Loading branch information
Alexander Lavrukov committed Dec 3, 2024
1 parent 4f473fb commit 2b5caae
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions databind/src/main/java/tech/ydb/yoj/databind/schema/Schema.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,26 @@ protected Schema(Schema<?> schema, String subSchemaFieldPath) {
JavaField subSchemaField = schema.getField(subSchemaFieldPath);

@SuppressWarnings("unchecked") ReflectType<T> rt = (ReflectType<T>) subSchemaField.field.getReflectType();
reflectType = rt;
this.reflectType = rt;

schemaKey = schema.schemaKey.withClazz(reflectType.getRawType());
this.schemaKey = schema.schemaKey.withClazz(reflectType.getRawType());

staticName = schema.staticName;
globalIndexes = schema.globalIndexes;
this.staticName = schema.staticName;
this.globalIndexes = schema.globalIndexes;

if (subSchemaField.fields != null) {
fields = subSchemaField.fields.stream().map(this::newRootJavaField).toList();
this.fields = subSchemaField.fields.stream().map(this::newRootJavaField).toList();
} else {
if (subSchemaField.getCustomValueTypeInfo() != null) {
var dummyField = new JavaField(new DummyCustomValueSubField(subSchemaField), subSchemaField, __ -> true);
dummyField.setName(subSchemaField.getName());
fields = List.of(dummyField);
this.fields = List.of(dummyField);
} else {
fields = List.of();
this.fields = List.of();
}
}
ttlModifier = schema.ttlModifier;
changefeeds = schema.changefeeds;
this.ttlModifier = schema.ttlModifier;
this.changefeeds = schema.changefeeds;
}

private void validateFieldNames() {
Expand Down

0 comments on commit 2b5caae

Please sign in to comment.