I have been working sometime now with CUBA platform and I like it very much!
I ran into a problem I could not find back on your forum.
I have created a view in my database, and based an cuba entity on it, ItemReview.
The view uses a underlying table, Items.
I created a itemreview-edit.xml screen to see the data of the view and to update some fields in the underlying table. So, from this UI view, I try to update the underlying table, Items.
I have created some code for this purpose, that ultimately ends up in a Service that does:
Somehow this goes wrong because I get the following Exception:
Internal Exception: java.sql.SQLException: Incorrect usage of UPDATE and ORDER BY
Error Code: 1221
Call: UPDATE vw_item_review SET COMMENTS = ?, LEVEL_AFTER_REVIEW = ?, stage = ? WHERE (item_id = ?)
CUBA tries to update my view vw_item_review, while it should be aware (by the class type) that I want to update the item table.
How do I instruct CUBA to update the Item table instead of the ItemReview view?
I use latest CUBA (7.2.7)
Hope this is a newbie question that can be answered very easily
All the best, Thanks in advance,