Fix for issue #39: No need for an open session to serialize identifiers of proxied entities.
Merge pull request #40 from drvdijk/master

Fix for issue #39