Table Creator
Your task is to produce CREATE TABLE
SQL commands from classes containing JPA annotations.
Supported Annotations
@Entity
- specifies that the class represents entity (table)name
- (optional) table name
@Id
- specifies field as aPRIMARY KEY
@GeneratedValue
- specifies that the field values should autoincrement (appendAUTO_INCREMENT
at the end of the column definition)@Column
- provides additional column informationname
- (optional) column namelength
- (optional) column length (use for VARCHAR types)nullable
- (optional) specifies if the field can be null
@Transient
- field is ignored@Enumerated
- field is an enumvalue
- (optional) specifies how to encode an enum (int or String)
Supported Java Types
long
maps toBIGINT
String
maps toVARCHAR
int
maps toINTEGER
EnumType.ORDINAL
toINTEGER
EnumType.STRING
toVARCHAR(25)
How to submit
Call me when the tests pass.
GL & HF :)