-
-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Description
I want to make a new annotation to replace @softdelete.
package org.baozi.bs.common.db.anntations;
import jakarta.enterprise.inject.Stereotype;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.hibernate.annotations.SoftDelete;
import org.hibernate.annotations.SoftDeleteType;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Stereotype
@SoftDelete(
columnName = "deleted",
strategy = SoftDeleteType.DELETED
)
public @interface LogicDelete {
}
When I add my annotation on entity, it's no use.
@Entity
@SoftDelete(columnName = "deleted", converter = DeleteFieldConverter.class)
@LogicDelete
@Table(name = "user")
public class UserEntity {
@Id
@SnowId
@Column(name = "id")
private Long id;
@Column(name = "username")
private String username;
// ...getters and setters
}
How can I use @softdelete on an annotation
Metadata
Metadata
Assignees
Labels
No labels