Fixed the generated code for default value of 0 to a class mapped to an enum.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
Merge pull request #376 from ddobrev/master

 Fixed the generated code for default value of 0 to a class mapped to an enum