I have added authentication to my Xataface site as instructed in the tutorials. Authentication, permissions and filters all work great but when I attempted to add a foreign key to the User table Xataface can not parse the selct statement properly from a valuelist. If I do not try to use a select widget and value list everything is fine.
Select Statement to populate the dropdown (in the valuelists.ini):
__sql__="SELECT ID, Name FROM User ORDER BY Name"
Note: If I replace the "User" table name with a different table name, the select statement works just fine and the dropdown is populated.
Is "User" some sort of key word within the Xataface SQL statement parsing functionality?
Current Code:
fields.ini
[User_ID]
widget:label = "User"
widget:description = "Select the User."
widget:type=select
vocabulary=SomeUsers
order=13
valuelists.ini
[SomeUsers]
__sql__="SELECT ID, Name FROM User ORDER BY Name"
Xataface Error
Fatal error: Failed parsing SQL query on select: SELECT ID, Name FROM User ORDER BY ID . The Error was Parse error: Unexpected clause on line 1 SELECT ID, Name FROM User ORDER BY ID ^ found: "User" in /Applications/XAMPP/xamppfiles/htdocs/xataface/lib/SQL/Parser.php on line 1755