Created
December 10, 2012 03:43
-
-
Save krams915/4248270 to your computer and use it in GitHub Desktop.
Spring Social Role.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.krams.domain; | |
| import javax.persistence.Entity; | |
| import javax.persistence.GeneratedValue; | |
| import javax.persistence.GenerationType; | |
| import javax.persistence.Id; | |
| import javax.persistence.OneToOne; | |
| import org.codehaus.jackson.annotate.JsonBackReference; | |
| @Entity(name="role") | |
| public class Role { | |
| @Id | |
| @GeneratedValue(strategy = GenerationType.AUTO) | |
| private Long id; | |
| @JsonBackReference | |
| @OneToOne | |
| private User user; | |
| private Integer role; | |
| public Role() {} | |
| ...getters/setters | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment