[ 
https://issues.apache.org/jira/browse/FINERACT-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17733387#comment-17733387
 ] 

Adam Saghy commented on FINERACT-1911:
--------------------------------------

I am wondering whether these additional data is primarily there to be stored 
and fetched or these are fields to be used for fetching a particular 
transaction? It really depends on the use case which one is to be favourable.

Having an additionalFields map (probably represented as a json at database 
side) is dynamic and flexible, but not best for filtering as indexing is not 
supported.

Having datatables for transaction entries can be proper, however the question 
is whether the datatable model to be used for all kind of transactions or 
should the transaction type to be used as well for mapping? Technically it is 
possible: _application_table_name_ is {*}m_savings_transaction table{*}, 
_entity_subtype_ is the {*}savings transaction type{*}. Since the datatables 
were introduced for the purpose of extending an entities data model dynamically 
but still in a structured way, i think it could be a good candidate here. 
Mostly if these fields will be used for fetching / filtering a particular 
entry. The challenges here would be at the moment the transaction type is 
stored with the ordinal value of the enum, so in the database the 
_entity_subtype_ will store sometimes as a {*}string{*}, sometimes as a 
*number.* But this is not a blocking issue, just....not consistent... 

> Assign Data Table to Transaction (Savings)
> ------------------------------------------
>
>                 Key: FINERACT-1911
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1911
>             Project: Apache Fineract
>          Issue Type: New Feature
>          Components: Data Tables
>            Reporter: Peter Santa
>            Priority: Major
>              Labels: BeanSalad
>
> h1. Background
> Currently data tables can be assigned to several entity types, but 
> transaction is not an option.
> h1. Goal
> The context is mainly Transactions of {*}Saving Accounts{*}, but it would be 
> great to implement the feature generally.
> The goal would be to make it possible to
>  * {*}assign data table to transactions{*}, and
>  * support multi-row and single-row tables - as it is already supported for 
> data tables that could be assigned to other entities.
> h1. Acceptance Criteria
>  * it is supported to assign *data tables to Transaction entities* of - at 
> least - savings accounts, and the solution fits into the current data table 
> conception



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to