On application startup I want to check if schema exists and: 1) if it doesn't -> create schema from Java class containing fields 2) if it differs for aforementioned class -> update the schema 3) if schema maps 1:1 with fields in Java class then do nothing
I've divided my task into 3 subtask and my first one would be to create a schema from existing Java class.
Here is my class (getters and setters omitted):
public class Order {
private String name;
private String phone;
private Address address;
private List<Amenities> amenities;
private BigDecimal distance;
private String image;
private List<Attributes> attributes;
private List<String> networks;
private OrderType orderType;
private Service service;
}
As you can see it has quite many field types which also should be used to create a schema (recursively?). Is it even possible to create a schema like that?