In memory master-detail scenario


I have master-detail table scenario, and I want to use temporary local variable when inserting record in child table rather than direct insert to phisical table, is there any suggestions to accomodate my issue?

Best Regards


Yes, you can directly manipulate the List that's bound to the Table Records Widget, and Ajax Refresh it to show the changes.

Hi Kilian,

Thanks for the suggestion.

Beside your suggestion, is there another way by using forge component?

For example, the component some how create virtual/logical table that I would bind with my table record widget, so when I call the save on parent table I also call something like "commit" for child table to save records from logical child table into physical child table.

If the is no component such like this, I must do it by my self as you said.

Best Regards,

Eddy Krismanto

Hi Eddy,

I'm not sure what exactly you want to achieve, but I'm not aware of any Forge component that does this.

Actually, when I insert a master-detail form, I forced to insert(and save to DB) the master record first before inserting child record.

If I want abort the transaction, i must explicitly delete the master record that has been created before.

So, i think, i must insert the child record to the variable/memory. When Save button in master record is pressed the child record is also saved to the DB.

That is the requirement.

I think very helping if there is component like that.

But if not, then I will use the way like you said before.

Best Regards,

Eddy Krismanto


Hi Eddy,

There is no component that can do that, as that is heavily dependent on your data model and even screen UI.

If you want to keep things in memory until you are ready to save the whole master-detail information, you will need to manage that yourself, creating records and storing them in variables, and when finally saving to database, not forgetting to stitch them together (assign newly created master record's Id to reference attributes of detail records before you persist them).

Be aware that if the user navigates away, he/she will likely loose all the work they've been doing on that screen, since it's in memory only.


Hi Jorge,

Oh I see, its about dependencies difficulties to my data model, that would be imposible to be implemeted.

Thanks for the explanations.

Best Regards,

Eddy Krismanto