Design question

Charles Yeomans yeomans at desuetude.com
Mon Feb 23 13:57:29 CST 2004


I'm in the middle of writing some accounting software, and I have the 
following problem.  I have several types of transactions, each of which 
I are represented by a class inheriting from an abstract class 
Transaction.  Mapping this scheme to a database is straightforward; I 
have a table boTransactions, and a table for each subclass that 
includes a ObjectPtr to boTransactions.  The question I have is this: 
given a boTransactions record, how can it know its base type?  Am I 
going to be forced to add a field to boTransactions?

Since Valentina is planned with object-relational support in mind, 
perhaps there is a better way.

Charles Yeomans



More information about the Valentina mailing list