Let's begin by mapping our Event.java file so that each of the domain objects are saved as a document in our MongoDB database. This can be done by performing the following steps:
- With a document database, domain object mapping is a little different, but the same ORM concepts hold true. Let's begin with the Event JPA implementation, then take a look how we can transform our Entity to document mapping:
//src/main/java/com/packtpub/springsecurity/domain/Event.java ... import javax.persistence.*; @Entity @Table(name = "events") public class Event implements Serializable{ @Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id; private String summary; private String description; private Calendar ...