Hi all,
I posted an issue related to this before the holidays but the discussion strayed way off from what I was trying to find a solution for so I'm posting a new topic.
We just switched to the new 5.0 SP1 or 5.0.25 release as it provided us with a fix to an issue with Windows Desktop touch functionality. In doing so though it looks like a new issue has risen with the ORM functionality. In the logs I see the following message right after the call to my ORM function.
ReferenceError: Can't find variable: Opal
Which is coming from rhoapi-modules-ORM.js line 422.
In case it is needed here is my call to the ORM:
Rho.ORM.addModel(function(model) {
model.modelName("Order");
model.enable("sync");
model.property("LI_Date","string");
model.property("LI_OrderId","string");
model.set("partition", "order");
});
Thanks
Chris
6 Replies
I finally received a response back from my support ticket and it fixed this issue. Here's the response:
To prevent this error message while using JavaScript ORM API in 5.0.25, please kindly refer to the document below for implementation: http://docs.rhomobile.com/en/5.0.25/api/Orm
Below is a portion of snippet for your kind reference:
We have ZenDesk tickets open for this issue. We will update when we have a solution.
Just curious if you tried reverting back to the previous ORM JS:
To enable/continue usage of Old ORM API for existing Rhodes app
In "rhoconfig.txt" file remove 'use_new_orm' option or set it as use_new_orm = 0
Make sure that your main html file includes references to both files
rhoapi-modules.js
rhoapi-modules-ORM.js
I am already using the old ORM API, which was working just fine in version 5.0. The upgrade to 5.0.25 caused the error for me without any code changes within my app.
Same issue here, any update?
I'm running into the exact issue as Chris. My application was working just fine before upgrading from 5.0.2 to 5.0.25. Now I get the same error:
"ReferenceError: Can't find variable: Opal"
and my app fails to run. Need a fix for this issue ASAP.
-Mark