This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Comment

Elaboration to Q1: From the docs, "As such, for autogeneration of an ObjectId to succeed the type of the Id property/field in your
class must be either a String, ObjectId, or BigInteger." But if I'm moving from relational to mongodb, I might typically have classes that have an "id" attribute of type, say, "long". In such a case, while moving to mongodb, would I have to add a new attribute ("newId") and mark that with @Id? And the existing "id" would have to be scrapped, eh?
The big issue is that there's an API change; guys talking to a long id, will now have to change to talk to, say, a BigInteger newId unless I do an internal conversion to preserve the API.