SX model changes [WAS: Updated DDL for SQL backend]

Derek Atkins warlord at MIT.EDU
Fri Oct 27 13:02:52 EDT 2006


Quoting Chris Shoemaker <c.shoemaker at cox.net>:

>> I don't have a good solution, at present ... just bringing it up.
>> Probably the right thing is for SXes to just suck it up and model
>> template transactions seperately from the "real"
>> accounts/transactions/splits, though there's some serious downsides
>> there, too.
>
> I'd actually recommend going the other direction.
>
>  1) eliminate all SX "virtual" accounts.
>  2) Introduce a flag to Transaction: "is_template"?
>  3) Make SX transactions out of real Transactions (with
> is_template=true), with real zero-valued Splits, belonging to the real
> accounts, with "scheduled" values as strings in the Split's KVP.
>  4) Change xaccQueryGetTransactions() and
> xaccSplitListGetUniqueTransactions() to ignore template transactions.
>
> What do you think?

I prefer separating them.  There are too many places where you could
build an incorrect query and get template txns where you really want
real ones, or vice-versa.

Also, the reason for the "account" is that an SX could need to create multiple
transactions at once.  I'm not sure how you would do this in your approach
where you eliminate these virtual accounts.

> -chris

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list