I have a many-to-many relation between two entities (transaction and payment).
Unfortunately the chosen payment records are not saved (changes are not propagate to the database - allow commit is checked). It works to select (and view in payment tab and tokenList) certain payments but when I try to edit transaction specific row (just saved) the payments are gone (empty).
collectionDatasource:paymentDs
select e from crmrai$Payment e left join e.transaction t
where t.id = :ds$transactionDs
I have a TokenList that selects a Many-to-Many records from an Entity.
Unfortunately when I try so save these records (press ok) there are not saved in database.Why?
Datasources save changes to the database (actually, by sending them to the middleware) when the datasource.commit() or the whole DsContext 5.commit() method is invoked. It is usually done when a user presses OK on the screen.
Taking into account the query you’ve posted, I assume that a TokenList connected to a datasource that isn’t related to the editor main datasource, i.e. the datasource that is saved when you click the Save button. But I can’t be sure without a demo project or at least source code of XML and Controller files.
I suggest creating a nested datasource and assign it to a TokenList component. Do not forget to include m-t-m relation to the main datasource view.
Thank you for your answer.
Initial the datasource was nested by I saw that for nested I don’'t have the possibility to insert Query (see below). Please advise.