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

Chris Shoemaker c.shoemaker at cox.net
Fri Oct 27 13:28:06 EDT 2006


On Fri, Oct 27, 2006 at 01:02:52PM -0400, Derek Atkins wrote:
> 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.

All queries would ignore template transactions, except those that
explicitly looked for them - just like it is now.

> 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.

A single SX can keep a list of transactions that are all scheduled at
once.

-chris


More information about the gnucash-devel mailing list