0

If the input data is null, when marshaling using my Bindy model (elToCSV) :

@DataField(pos = 7)  int nbRoom;

and route as follow:

from("direct:start").bean(ELProcessor.class,"myMethod").marshal(elToCSV).to("file:" + outFolder + "?fileName=test.csv");

it sets automatically a 0 and not an empty field into my output.

is there any parameters to define that i've missed ?

thanks

Nicolas Hauzaree
  • 743
  • 1
  • 5
  • 9

1 Answers1

1

A field with the type int can not be set to null. This is just not possible in Java. Use Integer instead for nbRoom.

Peter Keller
  • 7,526
  • 2
  • 26
  • 29