i realized that "interest_amount" on my "loan" table is multi-valued attribute. so should i just create a table to split "loan" table or should i create a different model? i need different table for "interest" since i have to mark each month's interest as paid/unpaid.
i created a new model "InterestAmount" and table "interest_amounts" which has to be inserted automatically once a "loan" is inserted.
Loan('id','amount','interest_rate')
InterestAmounts('id','loan_id','interest_amount')
here interest_amount is value computed using 'amount' and 'interest'. and data in table interestamount has to be inserted automatically.
do i need to use event and listener for automatic entry??