@Target(value=TYPE) @Retention(value=RUNTIME) public @interface SchemaHint
Example:
@Entity @SchemaHint(targetElement = SchemaHint.TargetElement.TABLE) public class Product { // fields of the entity }
By default, the mapper first tries to match the entity with a table, and if that doesn't work, with a UDT. This annotation allows you to provide a hint as to which check should be done, so that the mapper can skip the other one.
In addition, you can ask to completely skip the validation for this entity by using SchemaHint.TargetElement.NONE
.
Modifier and Type | Required Element and Description |
---|---|
SchemaHint.TargetElement |
targetElement |
public abstract SchemaHint.TargetElement targetElement
Copyright © 2017–2022. All rights reserved.