Merge pull request #196 from ddobrev/master

Generated dependent fields if they are of a union type
Ensured the internals of mapped classes are generated.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>