Suppresses schema validation for the annotated entity type or record component.
When placed on an entity type, all schema validation checks are skipped for that entity. When placed on a record component, validation checks for the corresponding column (or columns, in the case of inline records) are skipped.
Example usage:
// Suppress all schema validation for a legacy entity.
@DbIgnore
record LegacyUser(@PK Integer id, String name) implements Entity<Integer> {}
// Suppress schema validation for a specific field.
record User(
@PK Integer id,
@DbIgnore("DB uses FLOAT, but column only stores whole numbers")
Integer age
) implements Entity<Integer> {}
- Since:
- 1.9
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueOptional reason for ignoring schema validation.Documents why the mismatch is acceptable, for example:
@DbIgnore("DB uses FLOAT, but column only stores whole numbers") Integer age- Default:
""
-