Skip to content
Discussion options

You must be logged in to vote

Wooow. Never thought of this 😄 Yeah I imagine this requires quite a bit of hacking, your "child searches" principle sounds like a good one to achieve this with the current db architecture.

But in a scenario like this, with Income and Expense, I think the most likely DB architecture is one db table, for both. Something like budget_entries, that would have:

  • either a type column (income/expense)
  • or no type column, just identify entry types based on value being a positive/negative number;

And then (maybe) separate models, that would do stuff depending on the budget entry type, so Expense extends BudgetEntry and Income extends BudgetEntry. Then you'd be able to create CRUDs for each one, or …

Replies: 0 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by tabacitu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants