Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] What is wrong with this JPQL Query ?

You're first join is correct, other joins are missing the path:

1st join: from CsUser u join u.csRoles rl

next join: rl join Csresourcerolepermassign rrp

The key part in the first join is u.csRoles to show which mapping to join on. That is missing in subsequent joins.

Samba wrote:
Hi,
I'm facing some issues with the following query: select operation from Csoperation operation where operation.id <http://operation.id/> not in ((select rs.nativeid from CsUser u join u.csRoles rl join Csresourcerolepermassign rrp join Csresource rs join Csresourcetype rt where u.id <http://u.id/>=(select user.id <http://user.id/> from CsUser user where user.loginName=:userLogin) and rt.name <http://rt.name/>='operation' and rrp.permissions=(select p.value from Cspermission p where p.name <http://p.name/>='view'))); I'm getting the following the messages in the log :
-------------------------------------------------------------------------------------------------

Path expected for join!

Invalid path: 'rs.nativeid'

Invalid path: 'rt.name <http://rt.name>'

<AST>:0:0:unexpected end of subtree

left-hand operand of a binary operator was null

Invalid path: 'rrp.permissions'

<AST>:0:0:unexpected end of subtree

left-hand operand of a binary operator was null

the invalid paths referred in the error messages were present as fields in the respective entities.

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Can some one tell me if I'm doing some thing wrong here?

Thanks and Regards,
Samba


------------------------------------------------------------------------

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top