liefke / org.fastnate Public
FAQ
Pages 5
-
- FAQ
- How can I integrate Fastnate into my own project?
- What types of databases are supported?
- Which JPA implementations are supported?
- Which JPA features are supported?
- Which validators are applied during creation of SQL?
- Are mapping files supported?
- Why didn't the import-data task rewrite my SQL file, I've changed something relevant?
- I'm missing a feature in Fastnate. What can I do about it?
Clone this wiki locally
FAQ
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 fastnate.org.
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
-
@AssociationOverride
/@AssociationOverrides
-
AttributeConverter
/@Converter
/@Converts
() (see
@Convert
below for restrictions) -
@AttributeOverride
/@AttributeOverrides
-
@Basic
-
@CollectionTable
-
@Column
-
@Convert
() (only if specified on an attribute with a specific converter, see issue #36)
-
@DiscriminatorColumn
/@DiscriminatorType
/@DiscriminatorValue
-
@ElementCollection
-
@Embeddable
/@Embedded
-
@EmbeddedId
() (only for an embeddable with a single attribute or together with
@MapsId
, see issue #2) -
@Entity
-
@Enumerated
/EnumType
-
@ForeignKey
(Fastnate won't check for any ForeignKey constraints)
-
@GeneratedValue
/GenerationType
-
@Id
-
@IdClass
(see issue #2)
-
@Inheritance
/@InheritanceType
-
@JoinColumn
/@JoinColumns
/@JoinTable
-
@Lob
-
@ManyToMany
/@ManyToOne
/@OneToMany
/@OneToOne
-
@MapKey
-
@MapKeyColumn
/@MapKeyEnumerated
/@MapKeyTemporal
-
@MapKeyJoinColumn
/@MapKeyJoinColumns
-
@MappedSuperclass
-
@MapsId
-
@OrderColumn
-
@PrimaryKeyJoinColumn
-
@PrimaryKeyJoinColumns
(see issue #2)
-
@SecondaryTable
/@SecondaryTables
-
@SequenceGenerator
-
@Table
-
@TableGenerator
-
@Temporal
/TemporalType
-
@Transient
-
@Version
Some remarks:
- The
schema
andcatalog
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.
What is Fastnate? Read more at fastnate.org.