DDL table creation on startup - bobocode-breskul/bibernate GitHub Wiki
Bibernate can automatically create tables for classes having the @Entity
annotation.
Turning on this functionality by setting adding such a property - bibernate.ddl.create_tables=true
in this case, Bibernate will find all entities in the project, and create tables from them. If such tables already exist, it will drop them before creating.
Bibernate automatically defines the SQL type and constraints for a column. You can customize it by overriding fields in the @Column
annotation. If Bibernate can't find the correct SQL type for a field class or if you want to use another SQL type, you can customize it by using the @Column.columnDefinition
property.
Currently, this functionality correctly handles @OneToOne
, @ManyToOne
, and @OneToMany
relations. It creates join columns and adds foreign key constraints.
Handling the @ManyToMany
relation is not yet realized.