Skip to content

Ignore Hibernate @Where annotation #130

Open
@Aksigera

Description

@Aksigera

Hello,

I didn't find a way of how to ignore the Hibernate's @Where annotation on Entity.

The common approach to do so is to use nativeQuery, see stackoverflow.com/a/51250675/7968539.

But I'm not sure how to apply it to DataTables.

Is there a way to do so?

This is an entity with Hibernate's @Where annotation:

@Entity
@SQLDelete(sql = "UPDATE vehicle SET deleted_at = NOW() WHERE id = ?")
@Where(clause = "deleted_at IS NULL")
public class Vehicle extends AbstractEntity implements Serializable {...}

And this is a corresponding repository extending DataTablesRepository:

@Repository
public interface VehicleDataTableRepository extends DataTablesRepository<Vehicle, Long> {
}

Again, I need to see all Vehicles in my DataTable, disregarding the deleted_at column.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions