Hibernate @Filter not working on Child with FetchType.LAZY

I am with the following issue: When I execute a query on the parent entity (Contract) applying filters on child (ContractHeader) and using FetchType.LAZY, the LAZY rule is applied correctly, but when i try access the list of child (ContractHeader) the filters are not applied to child and all the children are loaded in the list. Can anyone help me with this question ? Filters should work with fetchtype.LAZY ? Tks !

My Hibernate verson: Hibernate ORM core version 5.4.17.Final

I have the following entities:

@Table(name = "contract")
@FilterDefs ({
    @FilterDef(name = "calculatedFilter",       parameters = {@ParamDef(name = "calculated",        type = "java.lang.String"  )}),
    @FilterDef(name = "headerStatusFilter",     parameters = {@ParamDef(name = "headerStatus",      type = "java.lang.String"  )})
public class Contract {

    private static final long serialVersionUID = 1L;

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "contract_id")
    private Long contractId;

    @OneToMany(mappedBy="contract",fetch = FetchType.LAZY, cascade = {CascadeType.ALL}, orphanRemoval=true)
    @Filters( {
        @Filter(name="calculatedFilter",        condition="calculated = :calculated"),
        @Filter(name="headerStatusFilter",      condition="header_status = :headerStatus")
    private List<ContractHeader> contractHeader;
@Table(name = "contract_header")
@JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class, property="contractHeaderId", resolver=EntityIdResolver.class, scope = ContractHeader.class)
public class ContractHeader implements Serializable {

    private static final long serialVersionUID = 1L;

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "contract_header_id")
    private Long contractHeaderId;

    @Column(name = "branch")
    private Integer branch;

    @Column(name = "calculated")
    private String calculated;

    @Column(name = "header_status")
    private String headerStatus;

    @JoinColumn(name = "contract_id", updatable=false)
    private Contract contract;

and before call the query i have enabled the filters:

session.enableFilter(“calculatedFilter”).setParameter(“calculated”, “S”); session.enableFilter(“headerStatusFilter”).setParameter(“headerStatus”, “A”);

The Queries generates:

Before accessing the child:

    contract0_.contract_id as contract1_2_
    contract contract0_ 
    exists (
            contract_header contracthe1_ 
            and contracthe1_.calculated = ? 
            and contracthe1_.header_status = ?


When accessing the child:

    contracthe0_.contract_id as contrac28_6_0_,
    contracthe0_.contract_header_id as contract1_6_0_,
    contracthe0_.contract_header_id as contract1_6_1_,
    contracthe0_.calculated as calculat5_6_1_,
    contracthe0_.header_status as header_6_6_1_
    contract_header contracthe0_ 

Has anyone implemented something like this successfully?

Recently faced a similar issue, where i had referenced a foreign key while lazy loading the JPA. Just try adding @Transactional annotation in the caller method, which tells the Spring to execute loading of foreign key as a separate transaction, which might fix this issue.