Skip to content

Instantly share code, notes, and snippets.

@katta
Created July 6, 2011 12:33
Show Gist options
  • Save katta/1067113 to your computer and use it in GitHub Desktop.
Save katta/1067113 to your computer and use it in GitHub Desktop.
CouchDB_Example_BlogPost
@TypeDiscriminator("doc.documentType == 'BlogPost'")
public class BlogPost extends CouchEntity {
private String name;
@DocumentReferences(backReference="blogPostId", fetch = FetchType.EAGER, cascade = CascadeType.ALL)
private Set<Comment> comments = new HashSet<Comment>();
/* getters and setters */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment