Gnucash and root-account in MySQL
clanlaw at googlemail.com
Sat Aug 8 04:14:35 EDT 2009
2009/8/8 Marcus Wolschon <Marcus at wolschon.biz>:
> I had a closer look at the data Gnucash 2.3.3 was writing into it`s
> MySQL-tables and I noticed
> that the entry for the root-account on the "accounts"-table is missing.
> All the accounts directly below root have the same parent_guid but there is no
> entry for that guid in the "accounts"-table.
> This is a serious architectural difference to the XML -datastructures where the
> root-account can have a currency and slots. It also means that
> referential integrity
> is never given. (Even when Gnucash is done and no longer connected. This is...
> not exactly acceptable behavior for a financial application.)
> Is this a bug in the gnucash-version I used?
> How is one to find the root-account without doing such expensive queries
> as "select parent_guid from accounts there parent_guid not in (select
> guid from accounts)"
> Where are the properties of the root-account stored when importing an
> existing XML-file or exporting it again? For a financial application I would
> expect it to guarantee 100% semantically identical content in that roundtrip.
The root account guid is in the books table (column
root_account_guid). This is causing me some pain as the type of the
object referenced by parent_guid is not consistent.
More information about the gnucash-devel