Commit 1a4214e5 by Juho Juopperi

user references

1 parent 14b637f0
...@@ -128,7 +128,7 @@ public class User implements ModelInterface { ...@@ -128,7 +128,7 @@ public class User implements ModelInterface {
@Column(name = "superadmin") @Column(name = "superadmin")
private boolean superadmin = false; private boolean superadmin = false;
@OneToMany( mappedBy = "voter", cascade = CascadeType.ALL) @OneToMany(mappedBy = "voter", cascade = CascadeType.ALL)
private List<Vote> votes; private List<Vote> votes;
@ManyToMany() @ManyToMany()
...@@ -145,7 +145,7 @@ public class User implements ModelInterface { ...@@ -145,7 +145,7 @@ public class User implements ModelInterface {
@OrderBy @OrderBy
private List<UserImage> userImageList; private List<UserImage> userImageList;
@OneToMany( mappedBy = "user") @OneToMany(mappedBy = "user")
private List<CompoEntryParticipant> compoEntryParticipants; private List<CompoEntryParticipant> compoEntryParticipants;
@OneToMany(mappedBy = "creator") @OneToMany(mappedBy = "creator")
...@@ -187,6 +187,9 @@ public class User implements ModelInterface { ...@@ -187,6 +187,9 @@ public class User implements ModelInterface {
@OneToMany(mappedBy = "admin") @OneToMany(mappedBy = "admin")
private List<EventOrganiser> eventOrganiser; private List<EventOrganiser> eventOrganiser;
@OneToMany(mappedBy = "user")
private List<PollAnswer> pollAnswers;
@Transient @Transient
private static final Logger logger = LoggerFactory.getLogger(User.class); private static final Logger logger = LoggerFactory.getLogger(User.class);
...@@ -198,7 +201,6 @@ public class User implements ModelInterface { ...@@ -198,7 +201,6 @@ public class User implements ModelInterface {
return ret; return ret;
} }
public User() { public User() {
} }
...@@ -582,4 +584,12 @@ public class User implements ModelInterface { ...@@ -582,4 +584,12 @@ public class User implements ModelInterface {
public UserImage getCurrentImage() { public UserImage getCurrentImage() {
return currentImage; 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; ...@@ -7,7 +7,7 @@ import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel; 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) @StaticMetamodel(User.class)
public class User_ { public class User_ {
public static volatile SingularAttribute<User, Integer> id; public static volatile SingularAttribute<User, Integer> id;
...@@ -45,4 +45,5 @@ public class User_ { ...@@ -45,4 +45,5 @@ public class User_ {
public static volatile ListAttribute<User, AccountEvent> soldItems; public static volatile ListAttribute<User, AccountEvent> soldItems;
public static volatile SingularAttribute<User, Integer> jpaVersionField; public static volatile SingularAttribute<User, Integer> jpaVersionField;
public static volatile ListAttribute<User, EventOrganiser> eventOrganiser; 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!