add unit test and fix for NH-3614

when getting the identifier in the selectrewiter it was returning a null constant when there was no class metadata, as it the case for type string
NH-3615 - Fix mapping by code of classes without namespaces.
Merge branch 'MattsGitCode-NH-3614' into 3.4.x
Merge branch '3.4.x'