I am stuck with Thrift about data types.
Now that I have a map and the integer value is generated using a bean, I use the i32 type in the idl definition.
class MyBean {
Integer i = null;
}
struct TMyBean {
1: i32 i;
}
The problem is that in the TMyBean generated by the bean, I var is a primitive int type, than it sets 0 as the default value, and for me 0 is a valid value.
I tried to put an optional keyword in the idl file, but everything does not change, it is always int.
How should I deal with this situation? I need me to take a null value in TMyBean i var.
Thank you Phaedra ..
source
share