Custom ID field in existing class for Mongo DB
Hi,
I am stuck on a problem with defining custom ID field for Mongo entity. I cannot use the @Id annotation nor the id/_id field name since the class is not managed by me.
Namely, I need to store org.springframework.security.core.session.SessionI nformation into Mongo DB and assume sessionId field as ID for MongoDB. Is there any way configure custom ID field by other means than modifying the document class itself?
I am implementing Spring security SessionRegistry stored in Mongo DB (using spring-data-mongo).
Thank you for any help.