New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCIError: ORA-00907: missing right parenthesis #260
Comments
For more info: The sql line in postgres(it works): However the same sql but for oracle becomes: It complains OCIError: ORA-00907: missing right parenthesis. |
@NZX what are you doing in Refinery CMS when this query gets executed? |
Most probably the issue is due to this line in awesome_nested_set gem https://github.com/collectiveidea/awesome_nested_set/blob/master/lib/awesome_nested_set/awesome_nested_set.rb#L540 As you can see Oracle cannot support .lock(true).first type of query as there is not LIMIT clause in Oracle and therefore it tries to generate inline view and add additional ROWNUM condition but FOR UPDATE is not supported in inline view. Probably you can try to patch awesome_nested_set gem and replace this line highest_right_row = nested_set_scope(:order => "#{quoted_right_column_full_name} desc").limit(1).lock(true).first with highest_right_row = nested_set_scope(:order => "#{quoted_right_column_full_name} desc").limit(1).select('id').first
highest_right_row = highest_right_row.class.find(highest_right_row.id).lock(true) Didn't test it :) but the idea is at first to get ID of first record and then do separate find by ID with FOR UPDATE lock. |
Hi @ugisozols, it's NZX but I'm using a different account. This query gets called after I create a new page in Refinery. |
Closing since it has not been updated recently. |
Hi, I am using oracle-enhance for a project using refinerycms with oracle DB backend. When I tried to create a new page from cms, I get this error : OCIError: ORA-00907: missing right parenthesis. The cms is setup properly. Do you know what might have caused this issue?
The text was updated successfully, but these errors were encountered: