-
Notifications
You must be signed in to change notification settings - Fork 388
Open
Description
Since TsidGenerator implements IdentifierGenerator, it cannot be used with @org.hibernate.annotations.ValueGenerationType. Example:
@ValueGenerationType(generatedBy = io.hypersistence.utils.hibernate.id.TsidGenerator.class)
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Inherited
public @interface TsidGeneratorAnnotation {
EventType[] timing();
}Error:
Caused by: org.hibernate.AnnotationException: Generator class 'io.hypersistence.utils.hibernate.id.TsidGenerator' implements 'IdentifierGenerator' and may not be used with '@ValueGenerationType'
Expected behavior
The @Tsid annotation works with both identifiers and normal values. Something like:
@Tsid // EventType.INSERT or EventType.UPDATE
@Column(name = "PUBLIC_ID", nullable = false, unique = true, updatable = false)
private Long publicId;Reactions are currently unavailable