Query getting executed 3 times

I’ve a simple validator ( customer already exists or not ). I see the below queries are executed three times.

Hibernate: 
    select
        p1_0.id 
    from
        party_entity p1_0 
    where
        upper(p1_0.party_name)=upper(?) 
    fetch
        first ? rows only
Hibernate: 
    select
        p1_0.id 
    from
        party_entity p1_0 
    where
        upper(p1_0.party_name)=upper(?) 
    fetch
        first ? rows only
Hibernate: 
    select
        p1_0.id 
    from
        party_entity p1_0 
    where
        upper(p1_0.party_name)=upper(?) 
    fetch
        first ? rows only

Any idea why these many times queries getting executed?

That’s probably related to this issue if you’re using Vaadin 24: Validation is triggered more frequently than necessary · Issue #4390 · vaadin/flow-components · GitHub

Yes, same issue

is it expected to be resolved in Dec ?

Partially. You can also improve your validator logic to include some caching to reduce the database queries

It’s part of a refactoring that is planned for v24.3 Validation refactor to fix issues related to the validated event · Issue #5537 · vaadin/flow-components · GitHub

You can also try to use setManualValidation on the field that triggers the validation. That might help