Java naming convention for an entity to be persisted in another database

We have a legacy application that stores an object named User in the database (it has Hibernate ORM annotations defined on it). Now the database migration will happen from MySQL to Mongo (storing data in both storage systems). In Mongo, User is a POJO with no annotation. Is there any naming convention that can be followed so that an object in different repositories can be uniquely identified.

My thought was having the same model name in different packages, or was naming an object with a storage prefix like MongoUser.I wrong in favor of my approach. Please suggest.

+3


source to share





All Articles