Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
16548 Переглядів

Hello,

Data of computed field is not storing in database . Is there any particular reason for making computed field so ?

What is the benefit of not storing value of computed field in database ? Can anyone explain it in detail ? Please give a complete explanation. 


Thanks & Regards

Аватар
Відмінити
Найкраща відповідь

Hello

 [ By default, a computed field is not stored to the database, and is

computed on-the-fly. Adding the attribute ``store=True`` will store the

field's values in the database. The advantage of a stored field is that

searching on that field is done by the database itself. The disadvantage

is that it requires database updates when the field must be recomputed. ]

Аватар
Відмінити
Найкраща відповідь

Hi Nikesh,

We use computed fields, if the value of field is computed using some logic and depends on other fields. For example: Total in Sale order is computed from sum of line subtotal

Computed field compute its value every time we access its value instead of reading from database.

By default, a computed field is not stored to the database, and is computed on-the-fly. Adding the attribute store=True will store the field's values in the database. The advantage of a stored field is that searching on that field is done by the database itself. The disadvantage is that it requires database updates when the field must be recomputed.

For more please check Link


Hope this helps.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
бер. 15
4239
1
січ. 17
4999
2
бер. 24
2388
3
серп. 15
5084
4
вер. 24
21273