Reputation: 82
I'm using a framework called Qcube. before it was known for the name Qcodo. It has this feature called codegen where it generated model for all of your database table including their relations if any. The problem is that its generated files have syntax errors. I can't find any solutions after searching in google.
here is the error message:
Parse error: syntax error, unexpected ')' in C:\Program Files (x86)\Ampps\www\osnet\includes\model\generated\EmployeeGen.class.php on line 967
and here is the line that the error is pointing.
$objToReturn = Employee::QuerySingle(
QQ::AndCondition(
QQ::Equal(QQN::Employee()->Id, $intId),
),
$objOptionalClauses
);
P.S.
I know what caused the syntax error, but to clear things the line of code the has the syntax error is "generated" by the codegen function of the framework and not hardcoded by me. and I can't just edit the generated files, because there are as of now 58 tables and each table has its gen file and each gen file has atleast 10 errors like that and on top of that I need to re-genrate the files when I ad a new database table.
Hope there is someone out there who can help.
Upvotes: 0
Views: 133
Reputation: 79
It is based on your OS if your using windows then search for GO_BACK()
and wherever the value of GO_BACK(2)
is there change it to GO_BACK(3)
and GO_BACK(5)
to GO_BACK(6)
and restart it.
Upvotes: 0
Reputation: 183
This is a known bug when developing with QCubed in a WAMP environment. The codegen uses a function called GO_BACK() which relies on the template files having Linux line endings. Linux uses (lf) and Windows uses (cr lf). This means Windows uses one extra character.
This was reported as a bug by myself https://github.com/qcubed/framework/issues/107 and the issue is fixed in the latest release of QCubed that you can find download on Github.
Upvotes: 0