On Apr 22, 2011, at 2:13 AM, Christian Stimming wrote: > Am Freitag, 22. April 2011 schrieb John Ralls: >> The ERD is finally done and available for download at >> https://github.com/downloads/jralls/gnucash/gnucash_erd.png. >> >> For ease of access I've added a link to it on the SQL wiki page. >> >> One comment: It's a bit scary how much has gotten stuffed into KVP over the >> years. I think I found it all... > > Thanks a lot for collecting all these relations! Indeed the KVP contains way > too much stuff... > > The "post_date" field of the Transaction is stored in two places, not (only) > in KVP: It is stored directly in the object as a DATETIME field. > Additionally, > a year ago I added storing that date as a GDATE in the KVP, so that we can > get > rid of the timezone issue sometime in the future (because DATETIME is simply > the wrong type for that field, > https://bugzilla.gnome.org/show_bug.cgi?id=137017 ). However, the GDate kvp > is > currently only being set - I think it is never read anywhere, because the > DATETIME field is used everywhere and I haven't gotten around to implement > the > actual usage code for that. Can you recognize this explanation in the code, > or > did I mess up my memories already? > > Also, the two fields in Account which are stored as KVP should IMHO be moved > into real fields ASAP. But indeed, currently they are stored as KVP.
OK, now that you explain it I see what's going on with date-posted. There are a lot of places that still call xaccTransSetDatePostedTS(), though, so the KVP isn't always getting set. I found a few more KVPs in my list that I'd missed putting on the diagram and some errors (in the unused "Period" module) too. I've revised it and uploaded a new version. Regards, John Ralls _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
