JPQL computed attribute

When you need a computed attribute, you have to use the Method-based attribute or a specific code in the view.
That’s not a good solution when you have a large result from your query set and the the computed code has to make a query to each computation (N+1 queries problem)

A solution could be to have JPQL computed attribute that can be plugged in the initial query if the computed field in the fetch plan.

@JmixProperty
@DependsOnProperties({"firstName", "lastName"})
@JPQLSelect("CONCAT(COALESCE({E}.firstName,''), ' ', COALESCE({E}.lastName,''))")
public String getFullName() {
    return this.firstName + " " + this.lastName;
}

Interesting idea.
Created issue: Computed entity attribute with initial value loaded by JPQL · Issue #2972 · jmix-framework/jmix · GitHub