Commit 1a4214e5 by Juho Juopperi

user references

1 parent 14b637f0
......@@ -128,7 +128,7 @@ public class User implements ModelInterface {
@Column(name = "superadmin")
private boolean superadmin = false;
@OneToMany( mappedBy = "voter", cascade = CascadeType.ALL)
@OneToMany(mappedBy = "voter", cascade = CascadeType.ALL)
private List<Vote> votes;
@ManyToMany()
......@@ -145,7 +145,7 @@ public class User implements ModelInterface {
@OrderBy
private List<UserImage> userImageList;
@OneToMany( mappedBy = "user")
@OneToMany(mappedBy = "user")
private List<CompoEntryParticipant> compoEntryParticipants;
@OneToMany(mappedBy = "creator")
......@@ -187,6 +187,9 @@ public class User implements ModelInterface {
@OneToMany(mappedBy = "admin")
private List<EventOrganiser> eventOrganiser;
@OneToMany(mappedBy = "user")
private List<PollAnswer> pollAnswers;
@Transient
private static final Logger logger = LoggerFactory.getLogger(User.class);
......@@ -198,7 +201,6 @@ public class User implements ModelInterface {
return ret;
}
public User() {
}
......@@ -582,4 +584,12 @@ public class User implements ModelInterface {
public UserImage getCurrentImage() {
return currentImage;
}
public void setPollAnswers(List<PollAnswer> pollAnswers) {
this.pollAnswers = pollAnswers;
}
public List<PollAnswer> getPollAnswers() {
return pollAnswers;
}
}
......@@ -7,7 +7,7 @@ import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2010-10-28T22:16:50.549+0300")
@Generated(value="Dali", date="2010-10-31T00:36:59.402+0300")
@StaticMetamodel(User.class)
public class User_ {
public static volatile SingularAttribute<User, Integer> id;
......@@ -45,4 +45,5 @@ public class User_ {
public static volatile ListAttribute<User, AccountEvent> soldItems;
public static volatile SingularAttribute<User, Integer> jpaVersionField;
public static volatile ListAttribute<User, EventOrganiser> eventOrganiser;
public static volatile ListAttribute<User, PollAnswer> pollAnswers;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!