Complete the code to specify the database column name for the field.
public class User { @Column(name = "[1]") private String username; }
The @Column(name = "user_name") annotation maps the username field to the user_name column in the database.
Complete the code to make the column non-nullable in the database.
public class Product { @Column(name = "price", [1] = false) private Double price; }
unique instead of nullable to control nullability.The nullable = false attribute ensures the price column cannot be null in the database.
Fix the error in the annotation to set the column length to 100 characters.
public class Employee { @Column(name = "email", length = [1]) private String email; }
size.The length attribute expects an integer value, so length = 100 is correct.
Fill both blanks to make the column unique and not nullable.
public class Category { @Column(name = "category_name", [1] = true, [2] = false) private String categoryName; }
insertable or updatable with uniqueness or nullability.Setting unique = true ensures no duplicate values, and nullable = false prevents null values.
Fill all three blanks to map the field with a custom column name, set length to 50, and make it non-updatable.
public class Order { @Column(name = "[1]", length = [2], updatable = [3]) private String orderCode; }
updatable to true when it should be false.The field is mapped to order_code column, limited to 50 characters, and cannot be updated after creation.