Validation failed for query for method public abstract java.util.List

Since priceAlertsTapas is Set you can't use dot-path.

@Query("select us.priceAlertsTapas.tapa from User us")

First you need to join it

@Query("select pat.tapa from User us join us.priceAlertsTapas pat")

I was getting this error as I was using table name in @Query(), but you have to use class name in @Query():

Incorrect:

@Transactional
@Modifying
@Query("from SHIPPING_DOC e where e.fulfillmentId in ?1")
List<ShippingDocumentsJsonEntity> deleteByFulfillmentIdIn(List<String> fulfillmentIds);

Correct:

@Transactional
@Modifying
@Query("from ShippingDocumentsJsonEntity e where e.fulfillmentId in ?1")
List<ShippingDocumentsJsonEntity> deleteByFulfillmentIdIn(List<String> fulfillmentIds);

You have no reason to use a left (outer) join if your are only interested in the rightmost entity - although I'm not sure that this is the reason for which the validation of your query fails.

I would try this:

@Query("select tapa fom PriceAlertsTapas pat join pat.tapa tapa where pat.priceAlert = ?1")
List<Tapa> tapasByUserPriceAlert (PriceAlert pa);

If a given "tapa" can have multiple association to a "price alert" (eg one per user) then you will find it multiple times in your return List. The solution is either to change the return type to Set<Tapa> or to use "select distinct...." in your query.

If, on the other hand, your PriceAlertsTapas is a simple many-to-many association, it might be better to use the @ManyToMany JPA annotation, eventually with @JoinTable. See, for example, here.