GDA: problem when modifying a transaction split
plongstaff at rogers.com
Thu Dec 7 10:49:49 EST 2006
On Thu, 2006-07-12 at 10:39 -0500, Derek Atkins wrote:
> Phil Longstaff <plongstaff at rogers.com> writes:
> > If I open a register, modify a split and then try to record the modified
> > transaction, the back end receives a commit call for the transaction,
> > not for any splits. However, the transaction is not dirty. I don't
> > really want to special case this (though queries for splits are already
> > special cased).
> The Splits, however, ARE marked dirty...
Yes, but the only commit received by the backend is for the transaction.
I have special-cased this for now so that if a clean transaction is
commited, the splits are checked and any dirty ones are committed.
However, see my other e-mail re a deleted split. When I receive the
commit request, deleted splits are not children of the transaction any
longer, so I have no way of knowing they should be deleted from the db.
I could change my special-case so that all transaction commits occur
whether the transaction is clean and dirty since a transaction commit
involves deleting all splits for the tx in the db and then saving them
again (+ all slots...). I've been trying to optimize db access as much
as possible, but this just expands it.
An alternative is change how the register commits changes but this gets
into completely new areas of the code.
More information about the gnucash-devel