Skip to content
Tobias Liefke edited this page May 4, 2020 · 17 revisions


Here you can find frequently asked questions about Fastnate.

How can I integrate Fastnate into my own project?

You can find all possible options in the download section of

What types of databases are supported?

Fastnate tries to support the majority of popular databases. For a complete list see the implementations of GeneratorDialect in the dialect package. If the database of your choice is not available, it is really easy to write your own dialect.

Which JPA implementations are supported?

The first version of Fastnate was tested with Hibernate only, as this is integrated in one of the most popular application servers JBoss/WildFly. But as some details are different in other JPA implementations we plan to support those as well in our issue #1.

Which JPA features are supported?

Fastnate supports nearly all features that are necessary when creating a new project, where you can define your own database model, while it ignores some features that are only necessary in more complex scenarios. Here is a complete list of the SQL relevant annotations and enum values that are supported in the latest version:

  • @Access/AccessType :white_check_mark:
  • @AssociationOverride/@AssociationOverrides :white_check_mark:
  • AttributeConverter/@Converter/@Converts (:white_check_mark:) (see @Convert below for restrictions)
  • @AttributeOverride/@AttributeOverrides :white_check_mark:
  • @Basic :white_check_mark:
  • @CollectionTable :white_check_mark:
  • @Column :white_check_mark:
  • @Convert (:white_check_mark:) (only if specified on an attribute with a specific converter, see issue #36)
  • @DiscriminatorColumn/@DiscriminatorType/@DiscriminatorValue :white_check_mark:
  • @ElementCollection :white_check_mark:
  • @Embeddable/@Embedded :white_check_mark:
  • @EmbeddedId (:white_check_mark:) (only for an embeddable with a single attribute or together with @MapsId, see issue #2)
  • @Entity :white_check_mark:
  • @Enumerated/EnumType :white_check_mark:
  • @ForeignKey :x: (Fastnate won't check for any ForeignKey constraints)
  • @GeneratedValue/GenerationType :white_check_mark:
  • @Id :white_check_mark:
  • @IdClass :x: (see issue #2)
  • @Inheritance/@InheritanceType :white_check_mark:
  • @JoinColumn/@JoinColumns/@JoinTable :white_check_mark:
  • @Lob :white_check_mark:
  • @ManyToMany/@ManyToOne/@OneToMany/@OneToOne :white_check_mark:
  • @MapKey :white_check_mark:
  • @MapKeyColumn/@MapKeyEnumerated/@MapKeyTemporal :white_check_mark:
  • @MapKeyJoinColumn/@MapKeyJoinColumns :white_check_mark:
  • @MappedSuperclass :white_check_mark:
  • @MapsId :white_check_mark:
  • @OrderColumn :white_check_mark:
  • @PrimaryKeyJoinColumn :white_check_mark:
  • @PrimaryKeyJoinColumns :x: (see issue #2)
  • @SecondaryTable/@SecondaryTables :x:
  • @SequenceGenerator :white_check_mark:
  • @Table :white_check_mark:
  • @TableGenerator :white_check_mark:
  • @Temporal/TemporalType :white_check_mark:
  • @Transient :white_check_mark:
  • @Version :white_check_mark:

Some remarks:

  • The schema and catalog attributes are ignored for all ...Table annotations for versions before Fastnate 1.5.0

Which validators are applied during creation of SQL?

Only a small subset of Bean Validators are applied:

  • javax.validation.constraints.NotNull
  • javax.validation.constraints.Size

Are mapping files supported?

No, but if you would like to use Fastnate for a project which needs mapping files, there is issue #13 which you can comment on.

Why didn't the import-data task rewrite my SQL file, I've changed something relevant?

The Fastnate import-data maven task is an incremental task. This means that it only starts the SQL generation, if something relevant has changed. How does it know that a relevant change exists? It tries to guess from the following:

  • The settings have changed.
  • The output file is missing.
  • One of the pre-/postfix files has changed.
  • One of the files from the configured data folder has changed.
  • One of the changed Java files is a DataProvider, Entity, Embeddable or MappedSuperclass

If you have other Java files which are relevant for generation, you will have to implement and configure a DataChangeDetector.

I'm missing a feature in Fastnate. What can I do about it?

You can either create an issue. Or you implement that feature yourself and create a pull request.