blaze-persistence icon indicating copy to clipboard operation
blaze-persistence copied to clipboard

Path expression colliding with entity name causes errors

Open beikov opened this issue 3 years ago • 0 comments

With the following model:

@Entity(name = "products")
public class Product { ... }
@Entity(name = "suppliers")
public class Supplier {
    @OneToMany
    List<Product> products;
}

we run into parsing issues for an expression like products, because that is interpreted as EntityLiteral instead of as PathExpression. We must adapt the parser so that EntityLiteral can only be parsed in special cases like =/<> and in predicates.

The workaround is, rename the association or the entity name to avoid running into this.

beikov avatar Feb 14 '22 09:02 beikov