Make it possible to use custom identity objects in the adapter.