#
netnut
I am trying to learn more about the architecture for Cuyahoga by creating a custom module. I have run across a data problem when trying to update data twice.
The scenario is this:
1. I save the user entered data to the database (MySQL). This can be multiple rows in the table.
2. I then retrieve a subset of that data (once again this can be multiple rows) into a RadioButtonList so that a single selection can be made
3. I then resave the data setting a "flag" column in the table based on the users selection. I only therefore want to update a single row.
The problem is that NHibernate throws an error on the second save saying that it cannot update the data because "the row has been updated or deleted already", or words to that affect.
I use transactions for the 2 "saves"
I have used the Articles module as a "template" for this custom module and the "save" functions are modified versions from this module.
I am using the latest downloadable release of Cuyahoga, not the SVN version.
I haven't included any code as I am assuming this is something really simple and I am just not getting it.
Do I have to somehow flush the data before the second save?
Cheers.
The scenario is this:
1. I save the user entered data to the database (MySQL). This can be multiple rows in the table.
2. I then retrieve a subset of that data (once again this can be multiple rows) into a RadioButtonList so that a single selection can be made
3. I then resave the data setting a "flag" column in the table based on the users selection. I only therefore want to update a single row.
The problem is that NHibernate throws an error on the second save saying that it cannot update the data because "the row has been updated or deleted already", or words to that affect.
I use transactions for the 2 "saves"
I have used the Articles module as a "template" for this custom module and the "save" functions are modified versions from this module.
I am using the latest downloadable release of Cuyahoga, not the SVN version.
I haven't included any code as I am assuming this is something really simple and I am just not getting it.
Do I have to somehow flush the data before the second save?
Cheers.