Creating a Record
Examples of Record Creation
/**
* <h1>Represents a customer</h1>
*/
public class Customer extends Record {
@RecordFieldAnnotation(type = RecordFieldType.PRIMARY)
public String uuid;
public String name;
/**
* This field will not get saved to the database.
*/
@RecordFieldIgnoreAnnotation
public Object flag;
}/**
* <h1>Represents a purchase</h1>
*/
public class Purchase extends Record {
@RecordFieldAnnotation(type = RecordFieldType.PRIMARY)
public String uuid;
@RecordFieldAnnotation(type = RecordFieldType.FOREIGN)
@ForeignKeyAnnotation(table = "Customer", field = "uuid")
public String customer;
}Last updated