Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
729 Näkymät

when searching in Odoo doc ,I found that: 

Imagine 2 models A and B

if B has a related field from A like A.age ,why does odoo store in the B.age the link to A.age not the actual value . the link costs more memory than the actual value 

Avatar
Hylkää
Paras vastaus

It's related so there must be a link somewhere in case the record get updated. Depending on the type of data, the link would not necessarily be more memory expensive compared to the value: such as an image, a big html content. My wife used to write her meeting schedule on a postit and put it on the fridge as reminder and she doesn't want to listening to my lecturing on single version of truth only to find out sometimes the meetings are rescheduled and she misses them. In ERP systems like Odoo, data consitency is of crucial values compared to be economical saving a few kb here and there.

Avatar
Hylkää
Tekijä

Thanks for clarification ,but the question if I have a bool or Int value ,Is storing links more memory expensive and that means that the data type of related fields is something else rather than the actual value type ?

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
5
toukok. 24
13649
1
helmik. 24
2076
7
heinäk. 16
6023
0
kesäk. 24
1189
3
helmik. 21
16523