GNOME Bugzilla – Bug 165096
GC 1.8.10 forgets HBCI <-> Account releationship when using SQL backend
Last modified: 2018-06-29 20:49:24 UTC
I've successfully setup HBCI online banking in GC 1.8.10. But when I close GC and restart it, I need to tell it again which HBCI account corresponds to which GC account. It doesn't happen if the file backend is used to store the data.
I'm not at all surprised. The SQL backend is broken in many ways; I'm not at all shocked that it's broken in this way, too.
Oops, so basically the HBCI functions are unusable with the SQL backend, and are only working with the file backend? That's bad. Derek: This HBCI <-> account relationship is stored in the kvp-frame of the account and it's quite simple (needs storing three particular strings, nothing more). What would need to be done to enable the storing of this information in the SQL backend? I vaguely recall some problems with kvp-frames and SQL... but are the kvp-frames still encouraged or rather deprecated in favor of something else?
Uh, kvps should work in SQL, but most likely you're hitting bug #87652 (or something thereabouts). You might need to do something like: xaccAccountBeginEdit() <modify kvp> xaccAccountCommitEdit() Even worse, you may need to "kick" the account in the <modify kvp> portion to get the account itself marked "dirty" so it gets re-written to the database. So, I think this is an HBCI bug, not a SQL bug.
Actually the BeginEdit/CommitEdit is already being used in the kvp setting. So this obviously is not yet enough :-(
You might need to also do something like: QOF_INSTANCE(acct)->dirty = TRUE; before the CommitEdit(). Are you making any other changes to the Account between the begin/commit edit? Oh, also, this change probably wont work in 1.8 as-is; you'll need something to get the account marked dirty.
How about something like xaccAccountSetSlots_nc(acct, xaccAccountGetSlots(acct)); That should work in both 1.8 and HEAD, I guess.
Yea, that should work.
Ok, committed. This means the bug is hopefully resolved in CVS, which will become either a 1.8.12 or a 2.0.0 release.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=165096. Please update any external references or bookmarks.