Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » JPQL Error: collection-valued path '...' cannot be resolved to a valid association field(Defining a NamedQuery, the Validator signals me an Error but the query works well ...)
JPQL Error: collection-valued path '...' cannot be resolved to a valid association field [message #1814032] Mon, 02 September 2019 07:29
Kim Sönksen is currently offline Kim SönksenFriend
Messages: 1
Registered: September 2019
Junior Member
I have an Entity named Person which as the following property:

@ElementCollection(targetClass = Role.class, fetch = FetchType.EAGER)
@Enumerated(EnumType.STRING)
@CollectionTable(name = "person_roles")
private Set<Role> roles = new HashSet<>();


and I have a NamedQuery whis looks like this:

@NamedQuery(
 name = Person.NQ_GET_PERSON_BY_ROLE_ENTITY,
 query = "select a from Person a, IN(a.roles) r where r = :role and a.legalEntity = :legalEntity "


The Query works well and as expected, but the Validator in the UI always tells me

The collection-valued path 'a.roles' cannot be resolved to a valid association field.


Does someone know how to get around this annoying behaviour without completely disabling the validation?

Thnx in advance.
Previous Topic:Integer instead of int
Goto Forum:
  


Current Time: Thu Nov 21 03:11:45 GMT 2019

Powered by FUDForum. Page generated in 0.01851 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top