Sorted out serialziation of complex types in table