A new version 3.0.8 is available. Five versions have been released since the last announcement, so here is a summary of all changes since version 3.0.3.
Attribute converters (3.0.6)
Ujorm supports the standard JPA AttributeConverter. A converter can be assigned to a single attribute by the @Convert annotation. With @Converter(autoApply = true) it applies to every attribute of its type. Enums now use the same mechanism, whether they are stored by name or by ordinal. An invalid declaration is reported as soon as the domain model is built.
Own annotations, Jakarta is optional (3.0.7)
New annotations @UEntity, @UTable, @UId, @UColumn, @UManyToOne, @UJoinColumn, @UTransient, @UEnumerated and @UConvert from the package org.ujorm.annotation. The jakarta.persistence library is therefore no longer required at runtime. The Jakarta annotations keep working unchanged.
GraalVM and a JRE without a compiler (3.0.6)
The new HandlerPrecompiler class creates the mapping helper classes at build time. An application can then run in a GraalVM native image or in a JRE that has no compiler.
SelectQuery improvements
- filtering a foreign key by its relation object, without a JOIN (3.0.4)
- SQL DELETE driven by a type-safe
Criterion(3.0.4) - comparing two columns, e.g.
MetaEmployee.name.whereEq(otherKey)(3.0.6) SqlQuery.bind()converts a value by its attribute key (3.0.6)
Metamodel
- The
@Domainannotation generates a metamodel for classes that are not stored in a database too (3.0.4). - The
Meta*type is an interface now, instead of an abstract class (3.0.7).
Markdown to HTML (3.0.8)
MarkdownToHtmlConverter in the ujo-web module supports a table of contents by the [TOC] line, Pandoc-style heading attributes and nested lists.
Fixes
- a wrong primary key in the ON clause of a JOIN (3.0.4)
- a comparison with NULL is rendered as
IS NULL(3.0.6) - metamodel generation for a property without a setter and for a record with an excluded component (3.0.5)
- a foreign key kept as a raw value, e.g.
Long cityId(3.0.7)
Upgrade notes
- If your class extends a
Meta*type, changeextendstoimplements. - The deprecated annotations of the package
org.ujorm.orm.annotand theEnumMapperclass were removed. - An entity needs a setter for every mapped property. Otherwise mark the property by
@Transient.
<dependency>
<groupId>org.ujorm</groupId>
<artifactId>ujo-orm</artifactId>
<version>3.0.8</version>
</dependency>
The full list of changes is here.
No comments:
Post a Comment