I’ve got a solution using transactions, and I am wondering if there are any servoy commands that can cause a transaction to commit before I specifically tell it to do so.
I have been debugging this problem for a while, and despite my almost 100% certainty that I am correctly executing a start transaction, and telling it to rollback when the user decides to not save changes, the changes are committed anyway.
I’m using MyIsam Tables on MySql
Servoy R2 2.2.1-build 333
Java 1.4.2-56 (Mac OS X)
a portion of a stacktrace when this happens:
Edit start transaction
linux1_registry: Getting transaction for id=0, thread=AWT-EventQueue-0
linux1_registry: Started new transaction for id=0
used question less sql select pos.position_desc from person p left join person_position p_p on p.person_id=p_p.person_id left join position pos on p_p.position_id=pos.position_id where p.person_id=157 and (pos.position_desc="faculty" OR pos.position_desc="postdoc" OR pos.position_desc="grad student" OR pos.position_desc="staff")
linux1_registry: Released transaction, thread=AWT-EventQueue-0
linux1_registry: Getting transaction for id=0, thread=AWT-EventQueue-0
used sql select unit_person.unit_personid, unit_person.person_id, unit_person.unit_id, unit_person.dept_id, unit_person.dept_orderid from unit_person where unit_person.person_id = ? order by unit_person.unit_personid questiondata.lenght 1
questiondata[0]= 157 ,type: java.lang.Integer
linux1_registry: Released transaction, thread=AWT-EventQueue-0
query Done for RelatedFoundSet: 257 157 5536422 useCache: true THREAD: AWT-EventQueue-0, Time: 7
linux1_registry: Getting transaction for id=0, thread=AWT-EventQueue-0
used sql select unit.unit_id, unit.unit_name, unit.parent_person_id, unit.is_account, unit.default_dept from unit where unit.unit_id = ? order by unit.unit_id questiondata.lenght 1
questiondata[0]= 87 ,type: java.lang.Integer
linux1_registry: Released transaction, thread=AWT-EventQueue-0
query Done for RelatedFoundSet: 465 87 5536422 useCache: true THREAD: AWT-EventQueue-0, Time: 5
linux1_registry: Getting transaction for id=0, thread=AWT-EventQueue-0
used sql select dept.dept_id, dept.dept_name from dept where dept.dept_id = ? order by dept.dept_id questiondata.lenght 1
questiondata[0]= 24 ,type: java.lang.Integer
linux1_registry: Released transaction, thread=AWT-EventQueue-0
query Done for RelatedFoundSet: 527 24 5536422 useCache: true THREAD: AWT-EventQueue-0, Time: 13
linux1_registry: Ending transaction for transaction with id=0
linux1_registry: Doing ROLLBACK for transaction with id=0
linux1_registry: Closed connection, thread=AWT-EventQueue-0
linux1_registry: Got connection, thread=AWT-EventQueue-0
So I am at a loss, even the stacktrace says it’s rolling back.. But no, the data change shows up in both servoy’s cache and in the backend.
a little help?
Thanks…