Affects Version/s: 2.0.2
Fix Version/s: None
Security Level: All
I have two classes - Page and SiteVersion, which have a many to many relationship. Only SiteVersion is aware of the relationship (because the site is modular and I want to be able to take away and drop in the module that SiteVersion belongs to).
I do not seem to be able select pages based on criteria of SiteVersion.
Using this query on the cli tool:
SELECT p FROM SiteVersion v JOIN v.pages p WHERE v.id = 5 AND p.slug='index'
Gives me the error:
[Semantical Error] line 0, col -1 near 'SELECT p FROM': Error: Cannot select entity through identification variables without choosing at least one root entity alias.
Using the alternative join syntax does not work either:
SELECT p FROM SiteVersion v, Page p WHERE v.id = 5 AND p.slug='index' AND v.pages = p
Which gives me:
[Semantical Error] line 0, col 98 near 'pages = p': Error: Invalid PathExpression. StateFieldPathExpression or SingleValuedAssociationField expected.
|Field||Original Value||New Value|
|Status||Open [ 1 ]||Resolved [ 5 ] 2000|
|Resolution||Invalid [ 6 ]|
|Workflow||jira [ 12495 ]||jira-feedback [ 14801 ]|
|Workflow||jira-feedback [ 14801 ]||jira-feedback2 [ 16665 ]|
|Workflow||jira-feedback2 [ 16665 ]||jira-feedback3 [ 18918 ]|