Is there a simpler way to convert all my hibernate JPA application to mongodb application. Because all my entities like this
@Entity
@Table(name = "users") public class User implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;
@Column(name = "user_name")
private String userName;
@Column(name = "first_name")
private String firstName;
@Column(name = "last_name")
private String lastName;
@Column(name = "email")
private String email;
@Column(name = "password")
private String password;
@Column(name = "DEVICE_KEY")
private String deviceKey;
@Column(name = "status")
@Enumerated(EnumType.ORDINAL)
private MasterDataStatus status;
@Column(name = "password_history")
private int passwordHistory;
/*
* Set
*/
@OneToMany(fetch = FetchType.LAZY, mappedBy = "user")
private Set<PasswordHistory> passwordHistories = new HashSet<PasswordHistory>();